Skip to main content

Combines best parts of json and ujson for fast serialization

Project description

Combines best parts of json and ujson for fast serialization.

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

Uploaded Source

Built Distribution

fast_json-0.2.1-py2-none-any.whl (3.2 kB view details)

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for fast-json-0.2.1.tar.gz
Algorithm Hash digest
SHA256 2b0bf2974385b8ecf6e0a354a1cc38d5b4e7a0f47c9689cc2d6400445ec79b6b
MD5 6bce509b2f4654e361567aac8d23aec8
BLAKE2b-256 8c4dbc1afa3642f9e2550c7433a58253c6f09568e458e403f15801a7a3ca9ad8

See more details on using hashes here.

File details

Details for the file fast_json-0.2.1-py2-none-any.whl.

File metadata

File hashes

Hashes for fast_json-0.2.1-py2-none-any.whl
Algorithm Hash digest
SHA256 263dec826881ddfe4aed57abb96b75972b2f6e628765bac23468e788be743b39
MD5 9da15a7de4c82b9e0fbd43c6c6020c67
BLAKE2b-256 53f240d13a2ff09264e28dbe82752fcfdb14dff4e558fc8cf5c80e2a57759e4a

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