Skip to main content

Fast JSON serialization and deserialization with ujson

Project description

Fast JSON serialization and deserialization with ujson.

import fast_json

print(
    fast_json.dumps({
        "foo": "bar",
         "now": datetime.datetime.now()
    })
)

Serializing custom type

import fast_json
from collections import namedtuple


MyType = namedtuple("MyType", ["name", "value"])


@fast_json.convert.register(MyType)
def _(value):
    return "name={0.name} value={0.value}".format(value)


print(
    fast_json.dumps({
        "one": MyType(name="foo", value="bar")
    })
)

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

fast-json-0.1.0.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

fast_json-0.1.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file fast-json-0.1.0.tar.gz.

File metadata

  • Download URL: fast-json-0.1.0.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fast-json-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bb9b934ee774850d6a388f862669411eb3db0f0f4eee68e9830fa0ec1fc70afe
MD5 79a17227943d95abc51b2d7e6e865fb0
BLAKE2b-256 360b7c307ebd6dadedcf3756bbe76b21b5a0e3fdd535bc886ced40c0df0ff62c

See more details on using hashes here.

File details

Details for the file fast_json-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fast_json-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 63103dc467e729ae6240ef503853565958b1648d1edc214169d51d162f9cc413
MD5 fe9c3624aeb7d47d3cb21e1a76afc8c4
BLAKE2b-256 e66594bfdf9c15b54a498b6255fc0d2204e7ac57e86b490e8fc2e084d07b5277

See more details on using hashes here.

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