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-0.4.3.tar.gz (174.7 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: pyjson5-0.4.3.tar.gz
  • Upload date:
  • Size: 174.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyjson5-0.4.3.tar.gz
Algorithm Hash digest
SHA256 078e54dae04bd6a0ced943879ef378b3c950038a5ec9fb8b18f955afa892c959
MD5 3d6ab38320fda73971b2bd70d358f653
BLAKE2b-256 353605f1146f5ce8dc3f34f3b02eac8e9933c521441caa74494d636a83bcf73b

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