Deserialize JSON into Python objects and reverse.
Project description
nr.databind.json
The nr.databind.json
package implements (de-) serializers for nested payloads that usually
result from loading JSON-formatted data.
See also nr.databind.core.
Example
from nr.databind.core import Field, Struct, ObjectMapper
from nr.databind.json import JsonModule
class Person(Struct):
name = Field(str, prominent=True)
age = Field(int)
address = Field(int, default=None)
mapper = ObjectMapper(JsonModule())
print(mapper.deserialize({'name': 'John Wick', 'age': 48, 'address': 'Wicked St.'})) # Person(name='John Wick')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nr.databind.json-0.0.12.tar.gz
(11.2 kB
view hashes)
Built Distribution
Close
Hashes for nr.databind.json-0.0.12-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60e6a6af6abac27be143e00a17c39d5dee350dd496cffbe85ffce753b4217d53 |
|
MD5 | c737c5adae4b2261147bf9b8f9b72d95 |
|
BLAKE2b-256 | 4db7294e5736f0f2603a10fc65b0ba73f2fc57fae2aff8f5c564fec9cce0a428 |