Skip to main content

Serialize python standard types (tuple, bytes, dict with number keys, byte keys or tuple keys, and etc) with json

Project description

Serialize python standard types (tuple, bytes, dict with number keys, byte keys or tuple keys, and etc) with json. lambdaJSON lets you serialize python standard library objects with <json>. Typical usage:

#!/usr/bin/env python

>>> import lambdaJSON
>>> myComplexData = {(3+5j): b'json', (1, 2, 3): {b'lambda': [1, 2, 3, (3, 4, 5)]}}
>>> mySerializedData = lambdaJSON.serialize(myComplexData)
>>> myComplexData  == lambdaJSON.deserialize(mySerializedData )
True

>>>

Currently Supported Types

This types are covered in this version:

  1. Bytes

  2. Tuples

  3. Dicts (With Number, Tuple, String, Bool and Byte keys)

  4. other json supported types

Changes from previous

Added support for bool as dict key.

Project Info

Github project page: https://github.com/pooya-eghbali/lambdaJSON Mail me at: persian.writer [at] Gmail.com

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

lambdaJSON-0.1.2.zip (6.3 kB view hashes)

Uploaded Source

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