Python wrapper around rapidjson

Overview

python-rapidjson

Python wrapper around RapidJSON

Authors: Ken Robbins <[email protected]>
Lele Gaifax <[email protected]>
License: MIT License
Status: Build status 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.

Getting Started

First install python-rapidjson:

$ pip install python-rapidjson

or, if you prefer Conda:

$ conda install -c conda-forge python-rapidjson

Basic usage looks like this:

>>> 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:

$ 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:

$ 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.

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.

Issues
  • unix timestamp

    unix timestamp

    Rapidjson supports ISO8601 format for datetime object in dump. Possible to add support for unix timestamp? (can be handled with "default" parameter in dump but it is nice to have it built-in).

    opened by alka2 39
  • Unable to compile MacOS wheel for Python 3.4

    Unable to compile MacOS wheel for Python 3.4

    Under MacOS/clang, the compilation of the module with Python 3.4 runtime fails, see https://travis-ci.org/python-rapidjson/python-rapidjson/jobs/273856525

    opened by lelit 22
  • Option for calling default method for dictionaries with non string keys possible ?

    Option for calling default method for dictionaries with non string keys possible ?

    In order to allow serializejson to serialize dictionaries with no string keys, and enable serializejson to be a drop-in replacement for the Python pickle package, I wonder if it would be possible to add an option for automatically check if dictionaries contains only string keys, and call the "default" method if not, instead of raising a "TypeError: keys must be strings" .

    In the following code, I'm able to serialize a dictionary containing non string keys, by simulating call to default method for this dictionary.

    from serializejson import dumps,loads
    
    def default(inst): 
        if isinstance(inst,dict):
            return {
                  "__class__":"__main__.dict_json_keys",
                  "__init__": {dumps(key,indent=None):value for key, value in inst.items()}
                 } 
        return inst
            
    def dict_json_keys(**args):
        return {loads(key):value for key,value in args.items()}
            
    obj = {
            "string" : "str",
            b"bytes" : "bytes",
            True: "bool" , 
            2 : "int",
            3.4 : "float",
            (5,6) : "tuple",
            frozenset([7,8]) : "frozenset"
        }
    print(obj)
    """{'string': 'str', b'bytes': 'bytes', True: 'bool', 2: 'int', 3.4: 'float', (5, 6): 'tuple', frozenset({8, 7}): 'frozenset'}"""
    
    dumped = dumps(default(obj))
    
    """
    {
        "__class__": "__main__.dict_json_keys",
        "__init__": {
                "\"string\"": "str",
                "2": "int",
                "3.4": "float",
                "true": "bool",
                "{\"__class__\":\"bytes\",\"__init__\":[\"bytes\",\"ascii\"]}": "bytes",
                "{\"__class__\":\"frozenset\",\"__init__\":[8,7]}": "frozenset",
                "{\"__class__\":\"tuple\",\"__init__\":[5,6]}": "tuple"
        }
    }
    """
    
    print(dumped)    
    loaded = loads(dumped,authorized_classes = [dict_json_keys])
    assert obj == loaded
    

    Maybe dictionaries returned by default should not be checked for only string keys, to avoid double checking and consuming too much cpu. In addition, we should check before starting to serialize a dictionary, rather than calling default only when it encounters a TypeError, because if you write in a file stream, we will not be able to go back if we have started to serialize the beginning of the dictionary.

    What do you think about it ? Do you think it's feasible ?

    Thank you very much for your amazing python-rapidjson package .

    Baptiste

    opened by SmartAudioTools 21
  • Memory leaking in load

    Memory leaking in load

    I see constantly growing memory with rapidjson.load comparing to standard json.load I unpacked about 10k gzipped json files like this

    for file_name in os.listdir(path):
       with open(os.path.join(path, file_name), 'rb') as f:
            content = f.read()
            with BytesIO(contents) as file_object:
                with gzip.GzipFile(fileobj=file_object, filename='objects.json') as archive:
                    return rapidjson.load(archive)
    

    Memory consumption of rapidjson image With json lib memory is almost constant.

    opened by KKomarov 19
  • JSONEncoder not implemented?

    JSONEncoder not implemented?

    I get this error:

    AttributeError: module 'rapidjson' has no attribute 'JSONEncoder'
    

    Any plans to implement JSONEncoder?

    opened by sam-s 18
  • Generalize support for lists and tuples to extend to iterators

    Generalize support for lists and tuples to extend to iterators

    It would be great to be able to serialize, for example, a generator as that can be more efficient in terms of memory consumption; instead of having to construct a list of N items prior to serializing them, python-rapidjson could consume items from a generator and produce a JSON list.

    opened by hexaclock 15
  • Benchmark: Might be worth including hyperjson and orjson

    Benchmark: Might be worth including hyperjson and orjson

    Hi!

    The benchmark at https://python-rapidjson.readthedocs.io/en/latest/benchmarks.html does not include the potentially most interesting contender — orjson — now that ujson and yajl are dead. Are there plans benchmarking against orjson?

    Best, Sebastian

    opened by hartwork 14
  • Warnings during compile for v0.2.7

    Warnings during compile for v0.2.7

    I was updating the conda-forge feedstock to 0.2.7 and noticed the following warnings in the builds for linux and os x. Full logs here: https://circleci.com/gh/conda-forge/python-rapidjson-feedstock/tree/pull%2F6 https://travis-ci.org/conda-forge/python-rapidjson-feedstock/builds/314361977

    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
    ./rapidjson.cpp:1145:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
     };
     ^
    ./rapidjson.cpp:1145:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./rapidjson.cpp:1145:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./rapidjson.cpp:1145:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./rapidjson.cpp:1145:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./rapidjson.cpp:1145:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./rapidjson.cpp:1145:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./rapidjson.cpp:1145:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./rapidjson.cpp:2250:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
     };
     ^
    ./rapidjson.cpp:2250:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./rapidjson.cpp:2250:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./rapidjson.cpp:2250:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./rapidjson.cpp:2250:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./rapidjson.cpp:2250:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./rapidjson.cpp:2250:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./rapidjson.cpp:2250:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./rapidjson.cpp:2250:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./rapidjson.cpp:2250:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./rapidjson.cpp:2250:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./rapidjson.cpp:2250:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./rapidjson.cpp:2250:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./rapidjson.cpp:2250:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./rapidjson.cpp:2250:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    ./rapidjson.cpp:2250:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    
    ./rapidjson.cpp:1136:6: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
        {"datetime_mode",
    
         ^
    
    ./rapidjson.cpp:1137:63: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
         T_UINT, offsetof(DecoderObject, datetimeMode), READONLY, "datetime_mode"},
    
                                                                  ^
    
    ./rapidjson.cpp:1138:6: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
        {"uuid_mode",
    
         ^
    
    ./rapidjson.cpp:1139:59: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
         T_UINT, offsetof(DecoderObject, uuidMode), READONLY, "uuid_mode"},
    
                                                              ^
    
    ./rapidjson.cpp:1140:6: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
        {"number_mode",
    
         ^
    
    ./rapidjson.cpp:1141:61: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
         T_UINT, offsetof(DecoderObject, numberMode), READONLY, "number_mode"},
    
                                                                ^
    
    ./rapidjson.cpp:1142:6: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
        {"parse_mode",
    
         ^
    
    ./rapidjson.cpp:1143:60: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
         T_UINT, offsetof(DecoderObject, parseMode), READONLY, "parse_mode"},
    
                                                               ^
    
    ./rapidjson.cpp:2233:6: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
        {"skip_invalid_keys",
    
         ^
    
    ./rapidjson.cpp:2234:66: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
         T_BOOL, offsetof(EncoderObject, skipInvalidKeys), READONLY, "skip_invalid_keys"},
    
                                                                     ^
    
    ./rapidjson.cpp:2235:6: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
        {"ensure_ascii",
    
         ^
    
    ./rapidjson.cpp:2236:62: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
         T_BOOL, offsetof(EncoderObject, ensureAscii), READONLY, "ensure_ascii"},
    
                                                                 ^
    
    ./rapidjson.cpp:2237:6: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
        {"indent",
    
         ^
    
    ./rapidjson.cpp:2238:57: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
         T_UINT, offsetof(EncoderObject, indent), READONLY, "indent"},
    
                                                            ^
    
    ./rapidjson.cpp:2239:6: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
        {"sort_keys",
    
         ^
    
    ./rapidjson.cpp:2240:62: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
         T_BOOL, offsetof(EncoderObject, ensureAscii), READONLY, "sort_keys"},
    
                                                                 ^
    
    ./rapidjson.cpp:2241:6: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
        {"max_recursion_depth",
    
         ^
    
    ./rapidjson.cpp:2242:68: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
         T_UINT, offsetof(EncoderObject, maxRecursionDepth), READONLY, "max_recursion_depth"},
    
                                                                       ^
    
    ./rapidjson.cpp:2243:6: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
        {"datetime_mode",
    
         ^
    
    ./rapidjson.cpp:2244:63: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
         T_UINT, offsetof(EncoderObject, datetimeMode), READONLY, "datetime_mode"},
    
                                                                  ^
    
    ./rapidjson.cpp:2245:6: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
        {"uuid_mode",
    
         ^
    
    ./rapidjson.cpp:2246:59: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
         T_UINT, offsetof(EncoderObject, uuidMode), READONLY, "uuid_mode"},
    
                                                              ^
    
    ./rapidjson.cpp:2247:6: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
        {"number_mode",
    
         ^
    
    ./rapidjson.cpp:2248:61: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    
         T_UINT, offsetof(EncoderObject, numberMode), READONLY, "number_mode"},
    
                                                                ^
    
    24 warnings generated.
    
    opened by hajapy 14
  • object_hook memory leak

    object_hook memory leak

    OS: MacOS High Sierra Python version: 3.7.1 Rapidjson version: 0.6.3

    It seems I am facing a memory leak problem when using rapidjson.loads and utilizing an object hook. Here is an example code:

    import rapidjson
    from datetime import timedelta
    import tracemalloc
    
    tracemalloc.start()
    
    def object_hook(td):
        if '__td__' in td:
            return timedelta(td['__td__'])
        else:
            return td
    
    def parse_json():
        data = []
        for i in range(1, 100):
            data.append({"name": f"a{i}", "timestamp": timedelta(seconds=i)})
    
        a = rapidjson.dumps(
            data,
            datetime_mode=rapidjson.DM_ISO8601,
            default=lambda td: {"__td__": td.total_seconds()} if isinstance(td, timedelta) else td,
        )
    
        data = rapidjson.loads(
            a,
            datetime_mode=rapidjson.DM_ISO8601,
            object_hook=object_hook
        )
        return data
    
    print("before")
    if tracemalloc.is_tracing():
        snapshot = tracemalloc.take_snapshot()
        top_stats = snapshot.statistics('lineno')
        print([str(x) for x in top_stats[:10]])
    
    for _ in range(1000):
        parse_json()
    
    print("after")
    if tracemalloc.is_tracing():
        snapshot = tracemalloc.take_snapshot()
        top_stats = snapshot.statistics('lineno')
        print([str(x) for x in top_stats[:10]])
    

    After running this I get: 'memleaktest.py:9: size=3867 KiB, count=99000, average=40 B' as the first line of the tracemalloc output. I tried using objgraph as well, but it did not show any Python objects, so it seems like a C++ malloc issue here.

    I am using rapidjson in production and my, fairly simple, API is slowly eating memory and this is the prime suspect (getting a tracemalloc pointer to the line basically the same as the one here).

    Is this working as intended? Do you need any more information to pinpoint the problem?

    opened by mklokocka 13
  • Handle serialization/deserialization of date, time and datetime instances

    Handle serialization/deserialization of date, time and datetime instances

    Serialize also date and time objects, and implement the complementary operation recognizing strings containing such values.

    A new option, “DATETIME_MODE_ISO8601_UTC”, shifts the values to UTC.

    This is basically an extended version of the datetime support implemented in https://github.com/lelit/nssjson.

    opened by lelit 12
  • ImportError: DLL load failed: The specified module could not be found.

    ImportError: DLL load failed: The specified module could not be found.

    I get the following error with versions greater than 1.0 when importing rapidjson:

    ImportError: DLL load failed: The specified module could not be found.

    opened by xyxz-web 19
  • Have a validator's __call__ return the parsed json if no validation error is raised?

    Have a validator's __call__ return the parsed json if no validation error is raised?

    It would be nice if I could validate and loads a json string/bytes in one swell foop. Assuming that the validator must parse the json when performing validation, it should be pretty easy to return the parsed results post validation, right?

    opened by jessekrubin 3
  • Support for Apple's arm64 architecture (osx-arm64)

    Support for Apple's arm64 architecture (osx-arm64)

    Hi, I'm trying to install python-rapidjson on a new Apple MacBook with Apple Silicon, but it fails to install via Conda due to no packages matching the architecture. Would it be possible to add support for this?

    Thanks! Ryan

    opened by kartzke 2
  • Pin transitive dependencies for tests

    Pin transitive dependencies for tests

    I've just seen that python-rapidjson might not pin transitive dependencies.

    The issue is the following:

    • You pin a==1.2.3
    • a requires b, but does not pin it. At the time you pinned a, it used b==4.5.6.
    • Your CI pipeline works
    • b gets updated to 5.0.0
    • The next time you run your CI pipeline, you install b==5.0.0. Your CI pipeline breaks.

    One can avoid this by using pip-compile from pip-tools. Then one creates requirements.in file and let's pip-compile figure out the set of dependencies one needs. It's also cleaner, as pip-compile makes a comment and tells you why you have which dependency.

    Should I create a PR for this?

    opened by MartinThoma 6
  • dumps return bytes support ?

    dumps return bytes support ?

    Hello ! I'm looking to switch from simplejson to rapidjson. I need to have my objects serialized in bytes. Does rapidjson work internaly in str or in bytes in utf_8 ? If in bytes, to avoid loosing performences with two additionals conversions (one inside rapidjson bytes >str ) and one outside with encode ( my_object_serialized_bytes = dumps (my_object).encode ("utf_8")), I would like to have an option my_object_serialized_bytes = dumps (my_object, to_bytes = True) or something like that. Do you think it would be easy to add it? Dump already accept files open in binary mode. If yes, it could be great if RawJSON could take bytes too ! Thank you very much!

    opened by guilbut 3
  • Any way to know the current object being parsed?

    Any way to know the current object being parsed?

    Hi, I am dealing with very large objects and potentially large arrays of stuff. I'm not sure if I can tell from start_object or end_object the name of the object that was being parsed. For instance, if start_object told me the name I could choose to ignore that name (by passing a dummy dictionary) rather than loading it into memory.

    Take this for example:

    {
      "hello": "world",
      "obj": {
        "obj_val": "first_obj_val",
        "obj_val2": "second_obj_val",
        "obj_val3": 3
      },
      "arr": [
        2, 4, 6, 8
      ]
    }
    

    I only get callbacks on start of the object (twice, but nothing telling me it is unnamed or called "obj"), the end of the "obj" and main object, the end of the "arr" array, and strings for "first_obj_val" and "second_obj_val". I wish I knew the keys / names for any of these.

    For example, there's no way of knowing that "first_obj_val" refers to "obj_val" (or better yet, "obj.obj_val") until the very end.

    Am I doing it wrong?

    opened by TheSauceMan 2
  • Read only part of subtree

    Read only part of subtree

    I have a fairly large JSON file (6GB) of which I only want to read a certain subtree.

    I was trying to use object_hook to only return the whole object when the key matches, but object_hook is only called for leaves with values, for objects it is called with key: None.

    Is there something which I can do to read only read part of the file?

    opened by tahasabih 1
  • SAX Interface?

    SAX Interface?

    How difficult would it be to also expose the SAX interface so we can process files that are much larger than can fit in RAM?

    I am currently using ijson which has a yajl backend, but it's about 5x slower than RapidJSON.

    opened by liujimj 5
  • segfault on surrogate unicode

    segfault on surrogate unicode

    Python 3.6.1 (default, Mar 23 2017, 02:34:11)
    [GCC 4.9.2] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import json
    >>> import rapidjson
    >>> rapidjson.__version__
    '0.2.4'
    >>> foo = {"foo": "\ud80d"}
    >>> json.dumps(foo)
    '{"foo": "\\ud80d"}'
    >>> rapidjson.dumps(foo)
    Segmentation fault (core dumped)
    
    opened by a-tal 14
Python bindings for the simdjson project.

pysimdjson Python bindings for the simdjson project, a SIMD-accelerated JSON parser. If SIMD instructions are unavailable a fallback parser is used, m

Tyler Kennedy 474 Sep 24, 2021
🦉 Modern high-performance serialization utilities for Python (JSON, MessagePack, Pickle)

srsly: Modern high-performance serialization utilities for Python This package bundles some of the best Python serialization libraries into one standa

Explosion 230 Sep 9, 2021
MessagePack serializer implementation for Python msgpack.org[Python]

MessagePack for Python What's this MessagePack is an efficient binary serialization format. It lets you exchange data among multiple languages like JS

MessagePack 1.5k Sep 22, 2021
Generic ASN.1 library for Python

ASN.1 library for Python This is a free and open source implementation of ASN.1 types and codecs as a Python package. It has been first written to sup

Ilya Etingof 187 Sep 20, 2021
serialize all of python

dill serialize all of python About Dill dill extends python's pickle module for serializing and de-serializing python objects to the majority of the b

The UQ Foundation 1.5k Sep 23, 2021
Python library for serializing any arbitrary object graph into JSON. It can take almost any Python object and turn the object into JSON. Additionally, it can reconstitute the object back into Python.

jsonpickle jsonpickle is a library for the two-way conversion of complex Python objects and JSON. jsonpickle builds upon the existing JSON encoders, s

null 962 Sep 16, 2021
Ultra fast JSON decoder and encoder written in C with Python bindings

UltraJSON UltraJSON is an ultra fast JSON encoder and decoder written in pure C with bindings for Python 3.6+. Install with pip: $ python -m pip insta

null 3.4k Sep 24, 2021
Extended pickling support for Python objects

cloudpickle cloudpickle makes it possible to serialize Python constructs not supported by the default pickle module from the Python standard library.

null 1k Sep 23, 2021
simplejson is a simple, fast, extensible JSON encoder/decoder for Python

simplejson simplejson is a simple, fast, complete, correct and extensible JSON <http://json.org> encoder and decoder for Python 3.3+ with legacy suppo

null 1.4k Sep 24, 2021
A lightweight library for converting complex objects to and from simple Python datatypes.

marshmallow: simplified object serialization marshmallow is an ORM/ODM/framework-agnostic library for converting complex datatypes, such as objects, t

marshmallow-code 5.7k Sep 24, 2021
Protocol Buffers - Google's data interchange format

Protocol Buffers - Google's data interchange format Copyright 2008 Google Inc. https://developers.google.com/protocol-buffers/ Overview Protocol Buffe

Protocol Buffers 50.8k Sep 23, 2021
Crappy tool to convert .scw files to .json and and vice versa.

SCW-JSON-TOOL Crappy tool to convert .scw files to .json and vice versa. How to use Run main.py file with two arguments: python main.py <scw2json or j

Fred31 5 May 14, 2021
FlatBuffers: Memory Efficient Serialization Library

FlatBuffers FlatBuffers is a cross platform serialization library architected for maximum memory efficiency. It allows you to directly access serializ

Google 16.8k Sep 23, 2021