Uses builtin json. but adds a lookup dictionary with functions that encode/decode specific types.
TO INSTALL
$ pip install jsonplustypes
by default it is able to:
encode dat
by default it is able to:
* encode datetime,date and bson ObjectId's to and from
custom TYPE/VALUE dict
* dump with float precision if you want to cut off digits
Custom objects are encoded in the following verbose dict format (with datetime as example):
{
_TYPE_TAG:"DATETIME",
_VALUE_TAG:date_string
}
the github repo holds a reference javascript implementation of the same json serialization/deserialization
CHANGELOG:
==========
0.7.9:
added try, except for attr err in iteritems
0.7.8:
removed bad print statement
0.7.7
fixed so now uses str(type(obj).__name__)
0.7.6:
now loads and dumps iso datetime strings with the format:
"%Y-%m-%dT%H:%M:%S.%fZ"
0.7.5:
fixed the strange float precision limiter
not based on monkeypatching the json.encoder.FLOAT_REPR and json.encoder.c_make_encoder, which means it now runs without the C speedups
0.7:
added encoder for datetime.date and bson ObjectId
0.6:
fixed bug - JSONEncoder -> json.JSONEncoder
TO INSTALL
$ pip install jsonplustypes
by default it is able to:
encode dat
by default it is able to:
* encode datetime,date and bson ObjectId's to and from
custom TYPE/VALUE dict
* dump with float precision if you want to cut off digits
Custom objects are encoded in the following verbose dict format (with datetime as example):
{
_TYPE_TAG:"DATETIME",
_VALUE_TAG:date_string
}
the github repo holds a reference javascript implementation of the same json serialization/deserialization
CHANGELOG:
==========
0.7.9:
added try, except for attr err in iteritems
0.7.8:
removed bad print statement
0.7.7
fixed so now uses str(type(obj).__name__)
0.7.6:
now loads and dumps iso datetime strings with the format:
"%Y-%m-%dT%H:%M:%S.%fZ"
0.7.5:
fixed the strange float precision limiter
not based on monkeypatching the json.encoder.FLOAT_REPR and json.encoder.c_make_encoder, which means it now runs without the C speedups
0.7:
added encoder for datetime.date and bson ObjectId
0.6:
fixed bug - JSONEncoder -> json.JSONEncoder
Release files for jsonplustypes 0.7.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jsonplustypes-0.7.9.tar.gz | 2.4 kB | Details |
Release files / jsonplustypes-0.7.9.tar.gz
| Download URL | jsonplustypes-0.7.9.tar.gz |
|---|---|
| Size | 2.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8632bcfabfedf76c7f7e5e00bf111a6edb49624a33425af8e6188f7b2b14f4f
|
|
BLAKE2b-256 checksum How to use checksums |
ccdee2d36865c7082328d704233e502ac35a863c5b40f5de857cd18692982588
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |