Skip to main content

A parser for JSON that can start at an arbitrary point in the file

Project description

License PyPI CircleCI

jsua, pronounced Joshua, is a streaming sax-like parser for JSON files. It’s special because it doesn’t require you to start at the beginning of a JSON stream. You can start anywhere, and it will eventually start spitting out events.

Usage

from jsua import SynchronizingParser
from io import StringIO

json = StringIO('{"hello": "world"}')
parser = SynchronizingParser(json)

for state, event, value in parser.parse():
    print(state, event, value)

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

jsua-0.0.2.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

jsua-0.0.2-py3-none-any.whl (7.6 kB view hashes)

Uploaded Python 3

Supported by

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