yet another json libs using yyjson
Project description
pyyjson
Yet another Json Parser for Python
- based on yyjson bindings from @TkTech(yyjson)
- benchmarks are based on ultrajson
- original c library: [yyjson]: https://github.com/ibireme/yyjson
Supports
it supports standard libraries
- dump
- dumps
- load
- loads
functionalities.
loads examples
>>> import pyyjson
>>> pyyjson.loads("[1,2,3]")
[1, 2, 3]
>>> pyyjson.loads('[{"a":"b"}, 3, 4]')
[{'a': 'b'}, 3, 4]
dumps example
>>> pyyjson.dumps([{'a': 'b'}, 3, 4])
'[{"a":"b"},3,4]'
Benchmarks
each elements in cols denotes "calls/sec". Test suite is adapted from ujson's benchmark format.
content | json | ujson | orjson | pyyjson(mine) | |
---|---|---|---|---|---|
Arr of 256 doubles | ENCODE | 10119 | 35361 | 170829 | 124386 |
Arr of 256 dobules | DECODE | 28684 | 54593 | 170383 | 122328 |
Arr of 256 UTF-8 string | ENCODE | 5247 | 7344 | 45684 | 8797 |
Arr of 256 UTF-8 String | DECODE | 2838 | 5223 | 7248 | 5516 |
Arr of 256 strings | ENCODE | 36624 | 59568 | 216707 | 136944 |
Arr of 256 strings | DECODE | 66842 | 66960 | 100252 | 105645 |
Medium complex object | ENCODE | 9948 | 22344 | 80465 | 56106 |
Medium complex object | DECODE | 17183 | 28733 | 45008 | 26377 |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file pyyjson-0.1.0-py3.9-macosx-10.9-x86_64.egg
.
File metadata
- Download URL: pyyjson-0.1.0-py3.9-macosx-10.9-x86_64.egg
- Upload date:
- Size: 84.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea5e0e6ad2acc2b6d4ae57f881382f3f0a4da6a76aa05ebeebb8296a94247957 |
|
MD5 | fad7b9517efe5811675dc09c3a799863 |
|
BLAKE2b-256 | 956ce5a09380fffa890f7c0885e43066196062657a0a4eb3b1123d245edba015 |