jsonicdict
概要
jsonicdictは、PythonのListやDict等をJSONと全く同じ表記で記述できるようにするためのライブラリです。
インストール
pip install jsonicdict
使い方
import jsonicdict
または
from jsonicdict import true, false, null
サンプル
import jsonicdict
objnull = null
objfalse = false
objtrue = true
objnum = 200
objstr = "string"
objarray = [1, "string", true, false, null, {"key": "value"}]
objdict = {"null": null, "array": [1, 2, 3], "string": "string", "number": 1, "boolean": true, "false": false, "object": {"key": "value"}}
print(objnull) # -> None
print(objfalse) # -> False
print(objtrue) # -> True
print(objnum) # -> 200
print(objstr) # -> string
print(objarray) # -> [1, 'string', True, False, None, {'key': 'value'}]
print(objdict) # -> {'null': None, 'array': [1, 2, 3], 'string': 'string', 'number': 1, 'boolean': True, 'false': False, 'object': {'key': 'value'}}
import json
jsonnull = json.loads('null')
jsonfalse = json.loads('false')
jsontrue = json.loads('true')
jsonnum = json.loads('200')
jsonstr = json.loads('"string"')
jsonarray = json.loads('[1, "string", true, false, null, {"key": "value"}]')
jsondict = json.loads('{"null": null, "array": [1, 2, 3], "string": "string", "number": 1, "boolean": true, "false": false, "object": {"key": "value"}}')
print(jsonnull) # -> None
print(jsonfalse) # -> False
print(jsontrue) # -> True
print(jsonnum) # -> 200
print(jsonstr) # -> string
print(jsonarray) # -> [1, 'string', True, False, None, {'key': 'value'}]
print(jsondict) # -> {'null': None, 'array': [1, 2, 3], 'string': 'string', 'number': 1, 'boolean': True, 'false': False, 'object': {'key': 'value'}}
Metadata
Release files for jsonicdict 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jsonicdict-1.0.0.tar.gz | 2.2 kB | Without provenance | Details for jsonicdict-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jsonicdict-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for jsonicdict-1.0.0-py3-none-any.whl |
Total release size: 4.5 kB
Release files / jsonicdict-1.0.0.tar.gz
| Download URL | jsonicdict-1.0.0.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2fb93c67402b45d2abeb44eb7e1d181037ac43613dc35d4603602b8987034a23
|
|
BLAKE2b-256 checksum How to use checksums |
55d9d704a9b410e6b870165834337340bf50ac4a98c5e949e81363f41c77ea22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.13.0
|
Release files / jsonicdict-1.0.0-py3-none-any.whl
| Download URL | jsonicdict-1.0.0-py3-none-any.whl |
|---|---|
| Size | 2.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16dacd515cadba0c2f267fb3c9752349c6d38324ce4d8e2ee7c33c6147047afc
|
|
BLAKE2b-256 checksum How to use checksums |
7c3b723e50c03ab1fdc57b56c977deab02824bf3701b0e6097b31cab3a9a4bcd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.13.0
|
Security for jsonicdict 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.