Skip to main content

JSON5 serializer and parser for Python 3 written in Cython.

Project description

A JSON5 serializer and parser library for Python 3 written in Cython.

The serializer returns ASCII data that can safely be used in an HTML template. Apostrophes, ampersands, greater-than, and less-then signs are encoded as unicode escaped sequences. E.g. this snippet is safe for any and all input:

"<a onclick='alert(" + encode(data) + ")'>show message</a>"

Unless the input contains infinite or NaN values, the result will be valid JSON data.

All valid JSON5 1.0.0 and JSON data can be read, unless the nesting level is absurdly high.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pyjson5-1.6.0.post1-cp310-cp310-win_amd64.whl (132.4 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

pyjson5-1.6.0.post1-cp39-cp39-win_amd64.whl (132.4 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

pyjson5-1.6.0.post1-cp38-cp38-win_amd64.whl (133.6 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

pyjson5-1.6.0.post1-cp37-cp37m-win_amd64.whl (129.9 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

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