Deserialize JSON into Python objects and reverse.
Project description
Note: This package is in the dangerous land of
0.x.yversions and may be subject to breaking changes with minor version increments.
This package is superseded by databind.core.
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(str, default=None)
mapper = ObjectMapper(JsonModule())
print(mapper.deserialize({'name': 'John Wick', 'age': 48, 'address': 'Wicked St.'})) # Person(name='John Wick')
Copyright © 2020 Niklas Rosenstein
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nr.databind.json-0.0.14.tar.gz.
File metadata
- Download URL: nr.databind.json-0.0.14.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27c7a7a69f6f703a0c616b898950fdb53a51b39cf9874d412ebc12dea574f20e
|
|
| MD5 |
a69071b70fe62ae5ab7540d8ad3e4d1e
|
|
| BLAKE2b-256 |
b7ad46cd8ced8a77889c4a7bd718e2815968201bfe0d89a91bf950ba58ecde71
|
File details
Details for the file nr.databind.json-0.0.14-py2.py3-none-any.whl.
File metadata
- Download URL: nr.databind.json-0.0.14-py2.py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3765fd581c2ca2ee249ccfd460be0f472cc2bc9e5305e2f415d587a5e27c3b86
|
|
| MD5 |
059c19a29c26644c0f94ff7d3a82c088
|
|
| BLAKE2b-256 |
2ac7880f19ad45cce43f7667fa75b338e9e8e8ff2f10a3d90426b7f505970802
|