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 = {True: (3-5j), (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. Complex

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

  5. other json supported types

Changes from previous

Security fix. Using ast.literal_eval as eval.

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.5.zip (6.4 kB view details)

Uploaded Source

File details

Details for the file lambdaJSON-0.1.5.zip.

File metadata

  • Download URL: lambdaJSON-0.1.5.zip
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for lambdaJSON-0.1.5.zip
Algorithm Hash digest
SHA256 2895f4ceaddb7cd0863b324ae4cd34043bfbf1fc425c1df96f7ec23366dbc9ff
MD5 67e4f9f5ed1a07e9cba59fbcbc120f1a
BLAKE2b-256 96e983a888a819f4df41910a3df8be92645f3b5dd0919ee3bd37339a37f098ac

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