Python implementation of jsonurl, an alternative format for JSON data model
Project description
About
This is a python implementation of jsonurl, an alternative text format which encodes the same data model in a way that is more suitable for use in URLs.
This is an incomplete implementation.
Installation
pip install jsonurl-py
The package name is jsonurl_py to avoid confusion with an unrelated jsonurl package on pypi which implements an unrelated syntax. In theory you can install and import both packages without having them interfere with each other.
The project name uses a dash in the name for consistency with the existing jsonurl-js and jsonurl-java implementations.
Usage
import jsonurl_py as jsonurl assert jsonurl.loads('(a:1,b:c)') == {'a': 1, 'b': 'c'} assert jsonurl.dumps(dict(a=[1,2])) == '(a:(1,2))'
Command Line Interface
The package includes a command line interface for converting between jsonurl and standard json:
$ echo "(a:b)" | jsonurl-py load {"a": "b"} $ echo '{"a":"b"}' | jsonurl-py dump (a:b)
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
Built Distribution
Hashes for jsonurl_py-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01459ebc9b075833a6c19b5af99e3738193c2bd5ed3e4d4f840381df4fd8cb53 |
|
MD5 | 6da165bf1e37c1f0c19fb5404723f221 |
|
BLAKE2b-256 | d9f5d31f718c9c0a1daf97ce7eec8adc2f438dcc8dd35474f80586edcbf0f9f9 |