Skip to main content

JSON5 rough serializer and parser for Python 3 written in Cython.

Project description

This package is the same as pyjson5, but interprets True and False as booleans. For more information, see the source repository. https://github.com/Kijewski/pyjson5

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

Serializer

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.

Parser

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

Functions

You can find the full documentation online at https://pyjson5.readthedocs.io/en/latest/. Or simply call help(pyjson5x). :-)

The library supplies load(s) and dump(s) functions, so you can use it as a drop-in replacement for Python’s builtin json module, but you should use the functions encode_*() and decode_*() instead.

Compatibility

At least CPython 3.5 or a recent Pypy3 version is needed.

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

pyjson5x-1.6.2.tar.gz (233.9 kB view hashes)

Uploaded Source

Built Distributions

pyjson5x-1.6.2-pp39-pypy39_pp73-win_amd64.whl (113.4 kB view hashes)

Uploaded PyPy Windows x86-64

pyjson5x-1.6.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (270.5 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.28+ x86-64

pyjson5x-1.6.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl (141.6 kB view hashes)

Uploaded PyPy macOS 10.9+ x86-64

pyjson5x-1.6.2-pp38-pypy38_pp73-win_amd64.whl (114.0 kB view hashes)

Uploaded PyPy Windows x86-64

pyjson5x-1.6.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (240.7 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.28+ x86-64

pyjson5x-1.6.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl (142.1 kB view hashes)

Uploaded PyPy macOS 10.9+ x86-64

pyjson5x-1.6.2-pp37-pypy37_pp73-win_amd64.whl (114.1 kB view hashes)

Uploaded PyPy Windows x86-64

pyjson5x-1.6.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (240.5 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.28+ x86-64

pyjson5x-1.6.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl (142.0 kB view hashes)

Uploaded PyPy macOS 10.9+ x86-64

pyjson5x-1.6.2-cp311-cp311-win_amd64.whl (119.2 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

pyjson5x-1.6.2-cp311-cp311-win32.whl (107.7 kB view hashes)

Uploaded CPython 3.11 Windows x86

pyjson5x-1.6.2-cp311-cp311-musllinux_1_1_x86_64.whl (859.4 kB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

pyjson5x-1.6.2-cp311-cp311-musllinux_1_1_i686.whl (922.4 kB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ i686

pyjson5x-1.6.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (310.4 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.28+ x86-64

pyjson5x-1.6.2-cp311-cp311-macosx_10_9_x86_64.whl (160.2 kB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

pyjson5x-1.6.2-cp310-cp310-win_amd64.whl (122.3 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

pyjson5x-1.6.2-cp310-cp310-win32.whl (109.5 kB view hashes)

Uploaded CPython 3.10 Windows x86

pyjson5x-1.6.2-cp310-cp310-musllinux_1_1_x86_64.whl (867.1 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

pyjson5x-1.6.2-cp310-cp310-musllinux_1_1_i686.whl (932.7 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ i686

pyjson5x-1.6.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (329.5 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.28+ x86-64

pyjson5x-1.6.2-cp310-cp310-macosx_10_9_x86_64.whl (169.2 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

pyjson5x-1.6.2-cp39-cp39-win_amd64.whl (124.0 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

pyjson5x-1.6.2-cp39-cp39-win32.whl (110.8 kB view hashes)

Uploaded CPython 3.9 Windows x86

pyjson5x-1.6.2-cp39-cp39-musllinux_1_1_x86_64.whl (871.1 kB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

pyjson5x-1.6.2-cp39-cp39-musllinux_1_1_i686.whl (937.0 kB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ i686

pyjson5x-1.6.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (334.8 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.28+ x86-64

pyjson5x-1.6.2-cp39-cp39-macosx_10_9_x86_64.whl (173.0 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

pyjson5x-1.6.2-cp38-cp38-win_amd64.whl (124.6 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

pyjson5x-1.6.2-cp38-cp38-win32.whl (111.2 kB view hashes)

Uploaded CPython 3.8 Windows x86

pyjson5x-1.6.2-cp38-cp38-musllinux_1_1_x86_64.whl (869.5 kB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

pyjson5x-1.6.2-cp38-cp38-musllinux_1_1_i686.whl (934.1 kB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ i686

pyjson5x-1.6.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (333.3 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.28+ x86-64

pyjson5x-1.6.2-cp38-cp38-macosx_10_9_x86_64.whl (169.7 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

pyjson5x-1.6.2-cp37-cp37m-win_amd64.whl (121.4 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

pyjson5x-1.6.2-cp37-cp37m-win32.whl (110.5 kB view hashes)

Uploaded CPython 3.7m Windows x86

pyjson5x-1.6.2-cp37-cp37m-musllinux_1_1_x86_64.whl (823.4 kB view hashes)

Uploaded CPython 3.7m musllinux: musl 1.1+ x86-64

pyjson5x-1.6.2-cp37-cp37m-musllinux_1_1_i686.whl (890.9 kB view hashes)

Uploaded CPython 3.7m musllinux: musl 1.1+ i686

pyjson5x-1.6.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (282.2 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.28+ x86-64

pyjson5x-1.6.2-cp37-cp37m-macosx_10_9_x86_64.whl (165.3 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

pyjson5x-1.6.2-cp36-cp36m-win_amd64.whl (132.1 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

pyjson5x-1.6.2-cp36-cp36m-win32.whl (117.6 kB view hashes)

Uploaded CPython 3.6m Windows x86

pyjson5x-1.6.2-cp36-cp36m-musllinux_1_1_x86_64.whl (826.3 kB view hashes)

Uploaded CPython 3.6m musllinux: musl 1.1+ x86-64

pyjson5x-1.6.2-cp36-cp36m-musllinux_1_1_i686.whl (891.4 kB view hashes)

Uploaded CPython 3.6m musllinux: musl 1.1+ i686

pyjson5x-1.6.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (280.8 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.28+ x86-64

pyjson5x-1.6.2-cp36-cp36m-macosx_10_9_x86_64.whl (162.6 kB view hashes)

Uploaded CPython 3.6m macOS 10.9+ 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