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.1.tar.gz (48.0 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.1-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jsongeekai-0.1.1.tar.gz
  • Upload date:
  • Size: 48.0 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.1.tar.gz
Algorithm Hash digest
SHA256 40330836ea8aeff17e5cd6515e249a0fe4e5016c8107eb35514935f2125040c6
MD5 6bfccd748af6cc20d5bac1efc10a5954
BLAKE2b-256 64bf6db0f0c18ca01f03e4303983d93a111b0d1f431c0f2ac4fe8c226cf959f5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jsongeekai-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d6ef740a7f3ad5ef54828cc3dcecd0dec2e00ac944cf49c9386ef7990b7bd822
MD5 7ceb0eb1c27b7a81337e6da80379b8a2
BLAKE2b-256 9efb6d67153a334787d9f576e622b9ff1eb6546853d6ccc2b6e6c9c9c872d88c

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