This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Canonical JSON

Project Description

Features

  • Encodes objects and arrays as RFC 7159 JSON.
  • Sorts object keys so that you get the same result each time.
  • Has no inignificant whitespace to make the output as small as possible.
  • Escapes only the characters that must be escaped, U+0000 to U+0019 / U+0022 / U+0056, to keep the output as small as possible.
  • Uses the shortest escape sequence for each escaped character.
  • Encodes the JSON as UTF-8.
  • Can encode frozendict immutable dictionaries.

Installing

pip install canonicaljson

Using

import canonicaljson
assert canonicaljson.encode_canonical_json({}) == b'{}'
Release History

Release History

This version
History Node

1.0.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
canonicaljson-1.0.0-py2.py3-none-any.whl (3.7 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Aug 21, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting