Skip to main content

High Performance JSON Parser with SIMD Optimization

Project description

JsonGeek

🚀 A high-performance JSON parser for Python using WebAssembly SIMD optimizations.

PyPI version Python

Features

  • 🏃‍♂️ High Performance: Up to 2-3x faster than native JSON parsing for large datasets
  • 💪 SIMD Optimized: Utilizes WebAssembly SIMD instructions for parallel processing
  • 🔒 Safe: Full JSON specification compliance with robust error handling
  • 🌟 Modern: Python 3.8+ with type hints and async support
  • 🔧 Flexible: Simple API with advanced options for power users

Installation

pip install jsongeek

Quick Start

from jsongeek import loads

# Simple parsing
data = loads('{"name": "JsonGeek", "type": "WASM"}')

# With advanced options
from jsongeek import JSONParser

parser = JSONParser(use_simd=True)
result = parser.parse('{"numbers": [1, 2, 3, 4, 5]}')

Performance

Benchmark results comparing JsonGeek with other popular JSON parsers:

Library Small JSON (1KB) Medium JSON (100KB) Large JSON (1MB)
json 0.1ms 1.2ms 12.0ms
ujson 0.08ms 0.9ms 9.0ms
jsongeek 0.09ms 0.5ms 4.5ms

Use Cases

  • 🌐 Web APIs: Accelerate JSON parsing in FastAPI/Django applications
  • 📊 Data Science: Process large JSON datasets efficiently
  • 📈 Real-time Processing: Handle streaming JSON data with low latency
  • 🔍 Log Analysis: Parse large JSON log files quickly

Advanced Usage

from jsongeek import JSONParser

# Configure parser options
parser = JSONParser(
    use_simd=True,           # Enable SIMD optimizations
    validate_utf8=True,      # Strict UTF-8 validation
    max_depth=32            # Maximum nesting depth
)

# Parse with error handling
try:
    result = parser.parse('{"key": "value"}')
except JSONParseError as e:
    print(f"Parse error: {e}")

# Async parsing (coming soon)
async def parse_stream(stream):
    async for chunk in parser.parse_stream(stream):
        yield chunk

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

MIT License - see the LICENSE file for details.

Credits

JsonGeek is built with:

Support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jsongeekai-0.1.0.tar.gz (47.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jsongeekai-0.1.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file jsongeekai-0.1.0.tar.gz.

File metadata

  • Download URL: jsongeekai-0.1.0.tar.gz
  • Upload date:
  • Size: 47.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for jsongeekai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8fcbccda38676bd8b75110358b56e5cec7eeba5421588fee6fe46507c8cb2070
MD5 b776558a190a711d42cc0bc28900cbe9
BLAKE2b-256 d87d2053d5f4bd2f90925bde38e9664bc1d61e1e6df3434f6deccee437a039fd

See more details on using hashes here.

File details

Details for the file jsongeekai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: jsongeekai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for jsongeekai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14415cb38eb57bd51f0d1c03c0de1784577a1f2472fec8cfbffc13156d6ceba6
MD5 cb9f3234e735efecb89830272c705b6d
BLAKE2b-256 1e1aafd2b27202c88f76cdf175c444c3ac7a427891002708dd4bddb9ab6146d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page