All Projects → python-rapidjson → Python Rapidjson

python-rapidjson / Python Rapidjson

Licence: other
Python wrapper around rapidjson

Programming Languages

python3
1442 projects

Projects that are alternatives of or similar to Python Rapidjson

Easyjson
Fast JSON serializer for golang.
Stars: ✭ 3,512 (+742.21%)
Mutual labels:  json-parser, json-serialization
Jsoncons
A C++, header-only library for constructing JSON and JSON-like data formats, with JSON Pointer, JSON Patch, JSON Schema, JSONPath, JMESPath, CSV, MessagePack, CBOR, BSON, UBJSON
Stars: ✭ 400 (-4.08%)
Mutual labels:  json-parser, json-serialization
Spotify Json
Fast and nice to use C++ JSON library.
Stars: ✭ 145 (-65.23%)
Mutual labels:  json-parser, json-serialization
Jsondoc
JSON object for Delphi based on IUnknown and Variant
Stars: ✭ 20 (-95.2%)
Mutual labels:  json-parser, json-serialization
representable
Maps representation documents from and to Ruby objects. Includes JSON, XML and YAML support, plain properties and compositions.
Stars: ✭ 689 (+65.23%)
Mutual labels:  json-serialization, json-parser
Mir Ion
WIP, use libmir/asdf package for now
Stars: ✭ 78 (-81.29%)
Mutual labels:  json-parser, json-serialization
Json Dry
🌞 JSON-dry allows you to serialize & revive objects containing circular references, dates, regexes, class instances,...
Stars: ✭ 214 (-48.68%)
Mutual labels:  json-parser, json-serialization
Bfj
MOVED TO GITLAB
Stars: ✭ 164 (-60.67%)
Mutual labels:  json-parser, json-serialization
jackson-js
JavaScript object serialization and deserialization library using decorators. It supports also advanced Object concepts such as polymorphism, Object identity and cyclic objects.
Stars: ✭ 86 (-79.38%)
Mutual labels:  json-serialization, json-parser
domino-jackson
Jackson with Annotation processing
Stars: ✭ 46 (-88.97%)
Mutual labels:  json-serialization, json-parser
Spray Json
A lightweight, clean and simple JSON implementation in Scala
Stars: ✭ 917 (+119.9%)
Mutual labels:  json-parser, json-serialization
JsonFormatter
Easy, Fast and Lightweight Json Formatter. (Serializer and Deserializer)
Stars: ✭ 26 (-93.76%)
Mutual labels:  json-serialization, json-parser
Json
JSON for Modern C++
Stars: ✭ 27,824 (+6572.42%)
Mutual labels:  json-parser, json-serialization
Waargonaut
JSON decoding/encoding/manipulation library.
Stars: ✭ 82 (-80.34%)
Mutual labels:  json-parser, json-serialization
Fastjson
A fast JSON parser/generator for Java.
Stars: ✭ 23,997 (+5654.68%)
Mutual labels:  json-parser, json-serialization
Thorsserializer
C++ Serialization library for JSON
Stars: ✭ 241 (-42.21%)
Mutual labels:  json-parser, json-serialization
libstud-json
JSON pull-parser/push-serializer library for C++
Stars: ✭ 20 (-95.2%)
Mutual labels:  json-serialization, json-parser
kson
A Java serialization/deserialization library to convert Java Objects into json and back, faster and powerful then Gson.
Stars: ✭ 25 (-94%)
Mutual labels:  json-serialization, json-parser
AbacusUtil
Release the power in Java programming
Stars: ✭ 77 (-81.53%)
Mutual labels:  json-parser
Metastuff
Code I use in my game for all serialization/deserialization/introspection stuff
Stars: ✭ 337 (-19.18%)
Mutual labels:  json-serialization

.. -- coding: utf-8 -- .. :Project: python-rapidjson -- Introduction .. :Author: Ken Robbins [email protected] .. :License: MIT License .. :Copyright: © 2015 Ken Robbins .. :Copyright: © 2016, 2017, 2018, 2020 Lele Gaifax ..

================== python-rapidjson

Python wrapper around RapidJSON

:Authors: Ken Robbins [email protected]; Lele Gaifax [email protected] :License: MIT License__ :Status: |build| |doc|

__ https://raw.githubusercontent.com/python-rapidjson/python-rapidjson/master/LICENSE .. |build| image:: https://travis-ci.org/python-rapidjson/python-rapidjson.svg?branch=master :target: https://travis-ci.org/python-rapidjson/python-rapidjson :alt: Build status .. |doc| image:: https://readthedocs.org/projects/python-rapidjson/badge/?version=latest :target: https://readthedocs.org/projects/python-rapidjson/builds/ :alt: Documentation status

RapidJSON_ is an extremely fast C++ JSON parser and serialization library: this module wraps it into a Python 3 extension, exposing its serialization/deserialization (to/from either bytes, str or file-like instances) and JSON Schema__ validation capabilities.

Latest version documentation is automatically rendered by Read the Docs__.

__ http://json-schema.org/documentation.html __ https://python-rapidjson.readthedocs.io/en/latest/

Getting Started

First install python-rapidjson:

.. code-block:: bash

$ pip install python-rapidjson

or, if you prefer Conda__:

.. code-block:: bash

$ conda install -c conda-forge python-rapidjson

__ https://conda.io/docs/

Basic usage looks like this:

.. code-block:: python

>>> import rapidjson
>>> data = {'foo': 100, 'bar': 'baz'}
>>> rapidjson.dumps(data)
'{"bar":"baz","foo":100}'
>>> rapidjson.loads('{"bar":"baz","foo":100}')
{'bar': 'baz', 'foo': 100}
>>>
>>> class Stream:
...   def write(self, data):
...      print("Chunk:", data)
...
>>> rapidjson.dump(data, Stream(), chunk_size=5)
Chunk: b'{"foo'
Chunk: b'":100'
Chunk: b',"bar'
Chunk: b'":"ba'
Chunk: b'z"}'

Development

If you want to install the development version (maybe to contribute fixes or enhancements) you may clone the repository:

.. code-block:: bash

$ git clone --recursive https://github.com/python-rapidjson/python-rapidjson.git

.. note:: The --recursive option is needed because we use a submodule to include RapidJSON_ sources. Alternatively you can do a plain clone immediately followed by a git submodule update --init.

      Alternatively, if you already have (a *compatible* version of)
      RapidJSON includes around, you can compile the module specifying
      their location with the option ``--rj-include-dir``, for example:

      .. code-block:: shell

         $ python3 setup.py build --rj-include-dir=/usr/include/rapidjson

A set of makefiles implement most common operations, such as build, check and release; see make help output for a list of available targets.

Performance

python-rapidjson tries to be as performant as possible while staying compatible with the json module.

See the this section__ in the documentation for a comparison with other JSON libraries.

__ https://python-rapidjson.readthedocs.io/en/latest/benchmarks.html

Incompatibility

Although we tried to implement an API similar to the standard library json, being a strict drop-in replacement in not our goal and we have decided to depart from there in some aspects. See this section__ in the documentation for further details.

__ https://python-rapidjson.readthedocs.io/en/latest/quickstart.html#incompatibilities

.. _RapidJSON: http://rapidjson.org/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].