Ultra fast JSON decoder and encoder written in C with Python bindings

Overview

UltraJSON

PyPI version Supported Python versions PyPI downloads GitHub Actions status Travis CI status DOI Code style: Black

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 install ujson

Usage

May be used as a drop in replacement for most other JSON parsers for Python:

>>> import ujson
>>> ujson.dumps([{"key": "value"}, 81, True])
'[{"key":"value"},81,true]'
>>> ujson.loads("""[{"key": "value"}, 81, true]""")
[{'key': 'value'}, 81, True]

Encoder options

encode_html_chars

Used to enable special encoding of "unsafe" HTML characters into safer Unicode sequences. Default is False:

>>> ujson.dumps("<script>John&Doe", encode_html_chars=True)
'"\\u003cscript\\u003eJohn\\u0026Doe"'

ensure_ascii

Limits output to ASCII and escapes all extended characters above 127. Default is True. If your end format supports UTF-8, setting this option to false is highly recommended to save space:

>>> ujson.dumps("åäö")
'"\\u00e5\\u00e4\\u00f6"'
>>> ujson.dumps("åäö", ensure_ascii=False)
'"åäö"'

escape_forward_slashes

Controls whether forward slashes (/) are escaped. Default is True:

>>> ujson.dumps("http://esn.me")
'"http:\\/\\/esn.me"'
>>> ujson.dumps("http://esn.me", escape_forward_slashes=False)
'"http://esn.me"'

indent

Controls whether indentation ("pretty output") is enabled. Default is 0 (disabled):

>>> ujson.dumps({"foo": "bar"})
'{"foo":"bar"}'
>>> print(ujson.dumps({"foo": "bar"}, indent=4))
{
    "foo":"bar"
}

Benchmarks

UltraJSON calls/sec compared to other popular JSON parsers with performance gain specified below each.

Test machine:

Linux 5.0.0-1032-azure x86_64 #34-Ubuntu SMP Mon Feb 10 19:37:25 UTC 2020

Versions:

  • CPython 3.8.2 (default, Feb 28 2020, 14:28:43) [GCC 7.4.0]
  • nujson : 1.35.2
  • orjson : 2.6.1
  • simplejson: 3.17.0
  • ujson : 2.0.2
  ujson nujson orjson simplejson json
Array with 256 doubles          
encode 22,082 4,282 76,975 5,328 5,436
decode 24,127 34,349 29,059 14,174 13,822
Array with 256 UTF-8 strings          
encode 3,557 2,528 24,300 3,061 2,068
decode 2,030 2,490 931 406 358
Array with 256 strings          
encode 39,041 31,769 76,403 16,615 16,910
decode 25,185 24,287 34,437 32,388 27,999
Medium complex object          
encode 10,382 11,427 32,995 3,959 5,275
decode 9,785 9,796 11,515 5,898 7,200
Array with 256 True values          
encode 114,341 101,039 344,256 62,382 72,872
decode 149,367 151,615 181,123 114,597 130,392
Array with 256 dict{string, int} pairs          
encode 13,715 14,420 51,942 3,271 6,584
decode 12,670 11,788 12,176 6,743 8,278
Dict with 256 arrays with 256 dict{string, int} pairs          
encode 50 54 216 10 23
decode 32 32 30 20 23
Dict with 256 arrays with 256 dict{string, int} pairs, outputting sorted keys          
encode 46 41   8 24
Complex object          
encode 533 582   408 431
decode 466 454   154 164
Issues
  • Add wheels to PyPI

    Add wheels to PyPI

    First, thanks for building and maintaining ujson. We at spaCy use it pretty much everywhere where we deal with json.

    While many users don't mind installing from source, now as we have with wheels a solid binary distribution format it would be great if you could adopt it and provide wheels for OS X and Windows on PyPI.

    Setting up a build environment on Windows is particularly tricky as there is no simple guide you can follow that applies to all Python versions. What makes matters worse is that pip's error on a missing msvc compiler is unnecessarily cryptic and people are easily confused, see https://github.com/spacy-io/spaCy/issues/334

    The Python community is already pretty far in adopting wheels, see http://pythonwheels.com, unfortunately ujson still belongs in the not-supporting camp. As a popular Python package I urge you guys to adopt wheels.

    If you would provide wheels spaCy could be installed without build system on OS X and Windows as ujson is the only non-wheel dependency missing. I guess there will be many other projects that will benefit from it as well. If you think that's not possible we will probably have to switch to a slower alternative and/or provide a graceful fallback, that's not my preference though.

    If you need help setting up an automatic build system I can lend a hand. I would be also happy to provide ours (https://ci.spacy.io) to you.

    release help wanted 
    opened by henningpeters 53
  • Is this project still maintained?

    Is this project still maintained?

    Hello, I am a core dev for spyder-ide/spyder and we would like to update this package to distribute wheels.

    Do you think this is possible @cgbystrom, @hrosenhorn, @Jahaja, @Jhonte, @jskorpan, @mhansson, @mkristo, @msjolund, @mthurlin, @ogabrielson, @oskarblom, @ronniekk, @T0bs, @tjogin?

    Thanks!

    release 
    opened by goanpeca 38
  • Float decoding problem

    Float decoding problem

    I am seeing a floating point problem that I do not see in json or cjson. The first two tests below pass while the one using ujson fails. I am running Ubuntu 12.04 if that helps.

    import unittest
    import json
    import cjson
    import ujson
    
    
    class TestUJsonFloat(unittest.TestCase):
        def test_json(self):
            sut = {u'a': 4.56}
            encoded = json.dumps(sut)
            decoded = json.loads(encoded)
            self.assertEqual(sut, decoded)
    
        def test_cjson(self):
            sut = {u'a': 4.56}
            encoded = cjson.encode(sut)
            decoded = cjson.decode(encoded)
            self.assertEqual(sut, decoded)
    
        def test_ujson(self):
            sut = {u'a': 4.56}
            encoded = ujson.encode(sut)
            decoded = ujson.decode(encoded)
            self.assertEqual(sut, decoded)
    
    opened by gmnash 28
  • Support for OrderedDict?

    Support for OrderedDict?

    Any way to support ordered dicts? Is it even possible (efficiently) from C as it is a PyObject that overrides iter so without slow python calls it would probably be impossible unless iter implementation would be moved to C (detect object type and act accordingly)?

    It seems that no C json encoder supports it and this is probably the reason. Is that right?

    opened by 23doors 23
  • ujson long-term commitment

    ujson long-term commitment

    Is ujson still maintained? The last release on PyPi is over 2 years old. There seems to be a backlog of issues and PRs, and we're slightly concerned. Currently, we (https://github.com/crossbario/crossbar) have ujson as an optional dependency to accelerate on CPython, but seeing user affected (https://github.com/esnme/ultrajson/issues/184).

    opened by oberstet 22
  • ujson segfault on alpine linux

    ujson segfault on alpine linux

    I have no idea how to troubleshoot this. Maybe someone else has some insight? https://bugs.alpinelinux.org/issues/6765

    opened by ptman 20
  • Build Windows and MacOS

    Build Windows and MacOS

    For #219

    Changes proposed in this pull request:

    New Github action to build Windows and Mac wheels for Pythons 3.5 - 3.8.

    It works without the PyPi pushes - I can get all the wheels as build artifacts. I can't actually test the twine stuff as I don't have permission - even for TestPyPi.

    HTTPError: 403 Client Error: The user '***' isn't allowed to upload to project 'ujson'. See https://test.pypi.org/help/#project-name for more information. for url: https://test.pypi.org/legacy/`

    I tried nicking the PyPi upload section from the deploy.yml so you wouldn't have to change anything but it turns out that the pypa/[email protected] command it uses is only on Linux.

    The secret names for twine are pypi_username and pypi_password for PyPi and TWINE_USERNAME and TWINE_PASSWORD for TestPyPi but obviously you can change those.

    Let me know if I can help further.

    release Windows changelog: Added 
    opened by bwoodsend 19
  • ujson import error on alpine 3.9

    ujson import error on alpine 3.9

    After installing ujson in alpine 3.9, Python raises an ImportError when attempting to import the package:

    ImportError: Error relocating /usr/lib/python2.7/site-packages/ujson.so: strreverse: symbol not found
    

    Possibly related to #180 as the symptoms are similar.

    Full terminal output showing steps to reproduce:

    ~ $ docker pull alpine
    Using default tag: latest
    latest: Pulling from library/alpine
    Digest: sha256:b3dbf31b77fd99d9c08f780ce6f5282aba076d70a513a8be859d8d3a4d0c92b8
    Status: Image is up to date for alpine:latest
    ~ $ docker run --rm -it alpine sh
    / # apk add py-pip python python-dev gcc musl-dev
    fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
    fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
    (1/25) Installing binutils (2.31.1-r2)
    (2/25) Installing gmp (6.1.2-r1)
    (3/25) Installing isl (0.18-r0)
    (4/25) Installing libgomp (8.2.0-r2)
    (5/25) Installing libatomic (8.2.0-r2)
    (6/25) Installing libgcc (8.2.0-r2)
    (7/25) Installing mpfr3 (3.1.5-r1)
    (8/25) Installing mpc1 (1.0.3-r1)
    (9/25) Installing libstdc++ (8.2.0-r2)
    (10/25) Installing gcc (8.2.0-r2)
    (11/25) Installing musl-dev (1.1.20-r3)
    (12/25) Installing libbz2 (1.0.6-r6)
    (13/25) Installing expat (2.2.6-r0)
    (14/25) Installing libffi (3.2.1-r6)
    (15/25) Installing gdbm (1.13-r1)
    (16/25) Installing ncurses-terminfo-base (6.1_p20190105-r0)
    (17/25) Installing ncurses-terminfo (6.1_p20190105-r0)
    (18/25) Installing ncurses-libs (6.1_p20190105-r0)
    (19/25) Installing readline (7.0.003-r1)
    (20/25) Installing sqlite-libs (3.26.0-r3)
    (21/25) Installing python2 (2.7.15-r3)
    (22/25) Installing py-setuptools (40.6.3-r0)
    (23/25) Installing py2-pip (18.1-r0)
    (24/25) Installing pkgconf (1.6.0-r0)
    (25/25) Installing python2-dev (2.7.15-r3)
    Executing busybox-1.29.3-r10.trigger
    OK: 171 MiB in 39 packages
    / # pip install -U ujson
    Collecting ujson
      Downloading https://files.pythonhosted.org/packages/16/c4/79f3409bc710559015464e5f49b9879430d8f87498ecdc335899732e5377/ujson-1.35.tar.gz (192kB)
        100% |████████████████████████████████| 194kB 10.3MB/s 
    Installing collected packages: ujson
      Running setup.py install for ujson ... done
    Successfully installed ujson-1.35
    / # python -c 'import ujson'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ImportError: Error relocating /usr/lib/python2.7/site-packages/ujson.so: strreverse: symbol not found
    
    opened by ngaya-ll 18
  • UltraJSON 2.0.0 release checklist

    UltraJSON 2.0.0 release checklist

    Seeing as it's been over 4 years since the last release, and because support some EOL Python versions have been dropped in that time, I propose the next release should bump to version 2.0.0. Python 2.7 support should be retained for this one.

    Some things that come to mind to make a new release:

    • [x] Move https://github.com/esnme/ultrajson to https://github.com/ultrajson/ultrajson

    • [x] Review and merge open PRs

      • Reviews welcome from everyone, please comment those which are most important
    • [x] Get access to https://pypi.org/project/ujson/

      • I've emailed previous maintainer Jonas to ask him to add @cgbystrom, @rstms and me to PyPI (same usernames)
    • [x] Get access to https://test.pypi.org/project/ujson/

      • @segfault I see you've been using this for experimenting, would you mind adding @cgbystrom, @rstms and @hugovk too?
      • https://test.pypi.org/manage/project/ujson/collaboration/
    • [x] Set up Travis CI to deploy to TestPyPI on merge to master (to test the release machinery) and to PyPI on tags

      • I can set this up, it depends on previous two items
    • [x] Anything else?

    release 
    opened by hugovk 18
  • [Bug] Empty string cause `SystemError`

    [Bug] Empty string cause `SystemError`

    Flow:

    • Env
    • Problem
      • Reproduce
    • Tracking problem
    • Help

    Env:

    • OS: Windows | Version: 10 (Build 1909) | Arch: x64
    • CPU: Intel(R) Core i3-8130U
    • Python: PyPy 3.7 (3.7.5)
    • UltraJSON: Version 4.1.0

    Problem:

    Empty string (Length 0) will cause a problem that raise SystemError

    Reproduce

    The following example will raise a SystemError: WindowsError then print out

    import ujson
    
    try:
        ujson.loads('{"key": ""}')
    except SystemError as e:
        print(e)
    

    Tracking problem:

    Original code:

    static FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_string (struct DecoderState *ds)
    

    https://github.com/ultrajson/ultrajson/blob/f23afd07f19f1245ec1a75ee251bc1487fc58be7/lib/ultrajsondec.c#L369-L375

    In line 373, it tries to get the whole string, but since the string is empty, so it fails to get.

    case DS_ISQUOTE:
          {
            ds->lastType = JT_UTF8;
            inputOffset ++;
            ds->start += ( (char *) inputOffset - (ds->start));    // <- This line
            return ds->dec->newString(ds->prv, ds->escStart, escOffset);
          }
    

    Disclaimer: I can be wrong for pointing form here, but this file is where is problem cause.


    Help:

    Please help me to fix this issue, I'm not familiar with C (Meaning not even using it once),

    so I can't fix it myself (Even I want to do that so).

    opened by sam01101 6
  • Installing on Raspberry Pi failed

    Installing on Raspberry Pi failed

    Hi,

    I was not able to install ultrajson 4.0.2 on Raspberry Pi 3B, running OSMC version 2020.11-1. Other software versions are: python3 - 3.7.3 pip3 - 18.1 arm-linux-gnueabihf-gcc - 8.3.0

    This is the output from pip3:

    Collecting ujson Using cached https://files.pythonhosted.org/packages/86/0a/80d87aa4ee79980bddabef13cb7d95de330f85355cf08dfdaf874889b02b/ujson-4.0.2.tar.gz Installing build dependencies ... done Building wheels for collected packages: ujson Running setup.py bdist_wheel for ujson ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-io_rsoza/ujson/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/pip-wheel-q6wqrwh5 --python-tag cp37: running bdist_wheel running build running build_ext building 'ujson' extension creating build creating build/temp.linux-armv7l-3.7 creating build/temp.linux-armv7l-3.7/deps creating build/temp.linux-armv7l-3.7/deps/double-conversion creating build/temp.linux-armv7l-3.7/deps/double-conversion/double-conversion creating build/temp.linux-armv7l-3.7/lib creating build/temp.linux-armv7l-3.7/python arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I./python -I./lib -I./deps/double-conversion/double-conversion -I/usr/include/python3.7m -c ./deps/double-conversion/double-conversion/fast-dtoa.cc -o build/temp.linux-armv7l-3.7/./deps/double-conversion/double-conversion/fast-dtoa.o -D_GNU_SOURCE during RTL pass: expand ./deps/double-conversion/double-conversion/fast-dtoa.cc: In function 'bool double_conversion::FastDtoa(double, double_conversion::FastDtoaMode, int, double_conversion::Vector, int*, int*)': ./deps/double-conversion/double-conversion/fast-dtoa.cc:392:23: internal compiler error: Segmentation fault return RoundWeed(buffer, *length, DiyFp::Minus(too_high, w).f() * unit, unsafe_interval.f(), fractionals, one.f(), unit); Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-8/README.Bugs for instructions. error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

    Can anyone please help? Thanks

    opened by knenad72 0
  • ujson does not work properly for big integers when ujson.dumps

    ujson does not work properly for big integers when ujson.dumps

    What versions are you using?

    • OS: ubuntu 18.04 / mac os
    • Python: 3.6.9 / 3.8.6
    • UltraJSON: 4.0.2

    Please include code that reproduces the issue.

    The best reproductions are self-contained scripts with minimal dependencies.

    In [1]: import ujson
    
    In [2]: ujson.dumps([2**64,2**32])
    Out[2]: '[,4294967296]'
    
    In [3]: ujson.__version__
    Out[3]: '4.0.2'
    

    2**64 is missing without an exception

    In [4]: ujson.dumps(2**64)
    ---------------------------------------------------------------------------
    OverflowError                             Traceback (most recent call last)
    <ipython-input-4-1ffd9a0d3df6> in <module>
    ----> 1 ujson.dumps(2**64)
    
    OverflowError: int too big to convert
    

    while dumps a big int will raise an error, which is acceptable

    opened by bbtfr 0
  • ujson does not work well for big integers when ujson.loads

    ujson does not work well for big integers when ujson.loads

    >>> import ujson            
    >>> print(ujson.__version__)
    4.0.2
    >>> 
    >>> t='{"x":18446744073709552000}'
    >>> ujson.loads(t)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ValueError: Value is too big!
    >>> 
    
    opened by hatedog 0
  • ujson could not be found on Apple Silicon

    ujson could not be found on Apple Silicon

    What did you do?

    1. pyenv virtualenv 3.9.1 test
    2. pip install ujson
    3. import ujson

    What did you expect to happen?

    What actually happened?

    It appears that on silicon it does not correctly install any version:

    Bildschirmfoto 2021-03-28 um 12 22 25

    What versions are you using?

    • OS: macOS 11.2
    • Python: 3.9.1
    • UltraJSON: 4.0.2

    Please include code that reproduces the issue.

    The best reproductions are self-contained scripts with minimal dependencies.

    code goes here
    
    opened by muuvmuuv 1
  • UJSON 3.2.0 fails with PEP 517 error  in python:3.8-alpine

    UJSON 3.2.0 fails with PEP 517 error in python:3.8-alpine

    Hi, Installing ujson==3.20 fails with pep 517 error in python:3.8-alpine docker image.

    python: 3.8.8 pip: 21.0.1 alpine: 3.13.2

    Error seen:

    # pip install ujson==3.2.0
    Collecting ujson==3.2.0
      Downloading ujson-3.2.0.tar.gz (7.1 MB)
         |████████████████████████████████| 7.1 MB 5.5 MB/s 
      Installing build dependencies ... done
      Getting requirements to build wheel ... done
        Preparing wheel metadata ... done
    Building wheels for collected packages: ujson
      Building wheel for ujson (PEP 517) ... error
      ERROR: Command errored out with exit status 1:
       command: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpc6d83etx
           cwd: /tmp/pip-install-gx4381yt/ujson_f5814fe4d1274793ab08fd1f53a62dc0
      Complete output (15 lines):
      running bdist_wheel
      running build
      running build_ext
      building 'ujson' extension
      creating build
      creating build/temp.linux-x86_64-3.8
      creating build/temp.linux-x86_64-3.8/deps
      creating build/temp.linux-x86_64-3.8/deps/double-conversion
      creating build/temp.linux-x86_64-3.8/deps/double-conversion/double-conversion
      creating build/temp.linux-x86_64-3.8/lib
      creating build/temp.linux-x86_64-3.8/python
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I./python -I./lib -I./deps/double-conversion/double-conversion -I/usr/local/include/python3.8 -c ./deps/double-conversion/double-conversion/bignum-dtoa.cc -o build/temp.linux-x86_64-3.8/./deps/double-conversion/double-conversion/bignum-dtoa.o -D_GNU_SOURCE
      gcc: fatal error: cannot execute 'cc1plus': execvp: No such file or directory
      compilation terminated.
      error: command 'gcc' failed with exit status 1
      ----------------------------------------
      ERROR: Failed building wheel for ujson
    Failed to build ujson
    ERROR: Could not build wheels for ujson which use PEP 517 and cannot be installed directly
    
    opened by dashsatish 1
  • Dict Serialization and Deserialization

    Dict Serialization and Deserialization

    import ujson
    
    d = {1:100, "name":"json"}
    s = ujson.dumps(d)
    print(s)
    

    The code above will print {"1":100, "name":"json"} if I invoke the usjon.loads() function I can't get the value as d (the value in the code above) my expection is ujson.dumps() will output {1:100, "name":"json"} and ujson.loads() will finally get the same value as d

    import ujson
    
    d = {1:100, "name":"json"}
    s = ujson.dumps(d)
    dd = ujson.loads(s)
    print(d == dd)  # expected output is True
    

    is there any methods i can use to get that?

    question 
    opened by lpeng22t 1
  • Reporting Security Issues

    Reporting Security Issues

    Hi Ultrajson Maintainers,

    I've identified a few security vulnerabilities in Ultrajson. What is the preferred method to report security issues?

    We could collaborate via a private advisory: https://docs.github.com/en/github/managing-security-vulnerabilities/creating-a-security-advisory

    Alternatively, we can exchange contact information over Twitter DM: https://twitter.com/theBumbleSec

    Looking forward to hearing from you!

    Thank you,

    Jake

    opened by the-bumble 0
  • Inconsistent handling of surrogate pair characters

    Inconsistent handling of surrogate pair characters

    Ultrajson does not correctly handle surrogate pair characters. Per RFC 7159, unmatched surrogate pair characters are permitted in JSON:

    the ABNF in this specification allows member names and string values to contain bit sequences that cannot encode Unicode characters; for example, "\uDEAD" (a single unpaired UTF-16 surrogate).

    This behavior also disagrees with the built-in json module, which can handle strings containing surrogates correctly.

    Ultrajson will correctly parse strings containing surrogate pair characters, if they're written in an escaped form, but it will not parse unescaped surrogate pair characters, and it will never dump Python strings containing surrogate pairs to JSON. This means ujson fails to round-trip certain inputs; see the example below.

    What did you do?

    Attempted to .dumps() a string containing a surrogate pair character.

    What did you expect to happen?

    It is encoded into a string.

    What actually happened?

    An exception is raised:

    UnicodeEncodeError: 'utf-8' codec can't encode character '\udddd' in position 0: surrogates not allowed
    

    What versions are you using?

    • OS: Debian 5.7.17-1rodete4 (2020-10-01) x86_64 GNU/Linux
    • Python: Python 3.8.6 (tags/v3.8.6:db455296be, Nov 22 2020, 18:14:31)
    • UltraJSON: 4.0.1 (latest)

    Please include code that reproduces the issue.

    import ujson
    x = ujson.loads('"\\udead"')  # Works, produces a surrogate pair character
    y = ujson.dumps(x)  # Raises an exception
    

    Solving this problem is a bit annoying in native code. In Python, the solution is simply to add "surrogatepass" as a second parameter to str.encode(). That functionality isn't exposed in native code, however. The solution I used in Atheris (which found this bug) was to first try encoding the string using the normal method, and if that doesn't work, fall back to encoding it by dynamically making a call to the str.encode() function in Python. Since you only have to take the slow route if the fast route fails, this is not likely to meaningfully affect performance.

    opened by TheShiftedBit 1
  • Graph in README?

    Graph in README?

    Would it be useful to present the benchmarks with a graph instead of / in addition to the table? (graphs are pretty + easier to read)

    Assuming that the current table is built + inserted into the README as part of some CI/CD process, I could try to put together a PR that also tacks on a matplotlib plot

    documentation help wanted 
    opened by zdog234 1
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
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
🦉 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
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
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
Python wrapper around rapidjson

python-rapidjson Python wrapper around RapidJSON Authors: Ken Robbins <[email protected]> Lele Gaifax <[email protected]> License: MIT License Sta

null 429 Sep 17, 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
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
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
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
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
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
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
Corset is a web-based data selection portal that helps you getting relevant data from massive amounts of parallel data.

Corset is a web-based data selection portal that helps you getting relevant data from massive amounts of parallel data. So, if you don't need the whole corpus, but just a suitable subset (indeed, a cor(pus sub)set, this is what Corset will do for you--and the reason of the name of the tool.

null 5 Jun 15, 2021