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 Distribution

pyjson5-1.4.7.tar.gz (176.3 kB view details)

Uploaded Source

File details

Details for the file pyjson5-1.4.7.tar.gz.

File metadata

  • Download URL: pyjson5-1.4.7.tar.gz
  • Upload date:
  • Size: 176.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5

File hashes

Hashes for pyjson5-1.4.7.tar.gz
Algorithm Hash digest
SHA256 2acd7e9802dbb495d6150e87ba073b16ba729805512c4cafc6efa31cd4c15411
MD5 4d5d2de5c0ad78f18d5513c0d0ec83f4
BLAKE2b-256 6475df52b8bcecbec76eff2008ddc12acc54e7baf207fd7b8057cd40cc7c7762

See more details on using hashes here.

Supported by

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