python-anyjson
Port variant py39
Summary Multiple JSON library wrapper (3.9)
Package version 0.3.3
Homepage No known homepage
Keywords python
Maintainer Python Automaton
License Not yet specified
Other variants py310
Ravenports Buildsheet | History
Ravensource Port Directory | History
Last modified 20 NOV 2021, 04:14:38 UTC
Port created 01 APR 2018, 16:48:53 UTC
Subpackage Descriptions
single ############################## anyjson - JSON library wrapper ############################## Overview -------- Anyjson loads whichever is the fastest JSON module installed and provides a uniform API regardless of which JSON implementation is used. Originally part of carrot (http://github.com/ask/carrot/) Examples -------- To serialize a python object to a JSON string, call the `serialize` function: >>> import anyjson >>> anyjson.serialize(["test", 1, {"foo": 3.141592}, "bar"]) '["test", 1, {"foo": 3.141592}, "bar"]' Conversion the other way is done with the `deserialize` call. >>> anyjson.deserialize("""["test", 1, {"foo": 3.141592}, "bar"]""") ['test', 1, {'foo': 3.1415920000000002}, 'bar'] Regardless of the JSON implementation used, the exceptions will be the same. This means that trying to serialize something not compatible with JSON raises a TypeError: >>> anyjson.serialize([object()]) Traceback (most recent call last): TypeError: object is not JSON encodable And deserializing a JSON string with invalid JSON raises a ValueError: >>> anyjson.deserialize("""['missing square brace!""") Traceback (most recent call last): ValueError: cannot parse JSON description Contact ------- The module is maintaned by Rune F. Halvorsen . The project resides at http://bitbucket.org/runeh/anyjson . Bugs and feature requests can be submitted there. Patches are also very welcome. Changelog --------- See CHANGELOG file License ------- see the LICENSE file
Configuration Switches (platform-specific settings discarded)
PY310 OFF Build using Python 3.10 PY39 ON Build using Python 3.9
Package Dependencies by Type
Build (only) python-setuptools:single:py39
autoselect-python:single:standard
Build and Runtime python39:single:standard
Download groups
main mirror://PYPI/a/anyjson
Distribution File Information
37812d863c9ad3e35c0734c42e0bf0320ce8c3bed82cd20ad54cb34d158157ba 8332 anyjson-0.3.3.tar.gz
Ports that require python-anyjson:py39
No other ports depend on this one.