All Projects → Kijewski → pyjson5

Kijewski / pyjson5

Licence: Apache-2.0 license
A JSON5 serializer and parser library for Python 3 written in Cython.

Programming Languages

C++
36643 projects - #6 most used programming language
cython
566 projects
python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to pyjson5

meojson
A modern all-platform Json/Json5 parser/serializer, which is header-only and contains lots of syntactic sugar!
Stars: ✭ 41 (-51.76%)
Mutual labels:  json5
json5
Header only JSON/JSON5 parser and serializer for C++
Stars: ✭ 22 (-74.12%)
Mutual labels:  json5
awesome-json-next
A Collection of What's Next for Awesome JSON (JavaScript Object Notation) for Structured (Meta) Data in Text - JSON5, HJSON, HanSON, TJSON, SON, CSON, USON, JSONX/JSON11 & Many More
Stars: ✭ 50 (-41.18%)
Mutual labels:  json5
Json5
JSON5 — JSON for humans
Stars: ✭ 4,822 (+5572.94%)
Mutual labels:  json5
cdn
Simple and fast property-based configuration library for JVM apps, similar to JSON5 standard, also with JSON & YAML-like targets 🧾
Stars: ✭ 33 (-61.18%)
Mutual labels:  json5
jsonlint
JSON/CJSON/JSON5 parser, syntax & schema validator and pretty-printer with a command-line client, written in pure JavaScript.
Stars: ✭ 21 (-75.29%)
Mutual labels:  json5
sack.vfs
Node addon which adds a virtual file system interface; websockets; json(6) parsing; sql support(sqlite,odbc); javascript sched_yield; ssl certificate generation; more...
Stars: ✭ 29 (-65.88%)
Mutual labels:  json5
gulp-merge-json
A gulp plugin to merge JSON & JSON5 files into one file
Stars: ✭ 35 (-58.82%)
Mutual labels:  json5

PyJSON5

A JSON5 serializer and parser library for Python 3 written in Cython.

Serializer

The serializer returns ASCII data that can safely be used in an HTML template. Apostrophes, ampersands, greater-than, and less-then signs are encoded as unicode escaped sequences. E.g. this snippet is safe for any and all input:

"<a onclick='alert(" + encode(data) + ")'>show message</a>"

Unless the input contains infinite or NaN values, the result will be valid JSON data.

Parser

All valid JSON5 1.0.0 and JSON data can be read, unless the nesting level is absurdly high.

Functions

You can find the full documentation online at https://pyjson5.readthedocs.io/en/latest/. Or simply call help(pyjson5). :-)

The library supplies load(s) and dump(s) functions, so you can use it as a drop-in replacement for Python's builtin json module, but you should use the functions encode_*() and decode_*() instead.

Compatibility

At least CPython 3.5 or a recent Pypy3 version is needed.

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