https://github.com/rogpeppe/rjson
"readable JSON" - JSON-compatible codec with a few tweaks to make it quicker to write and easier to read
https://github.com/rogpeppe/rjson
Last synced: about 2 months ago
JSON representation
"readable JSON" - JSON-compatible codec with a few tweaks to make it quicker to write and easier to read
- Host: GitHub
- URL: https://github.com/rogpeppe/rjson
- Owner: rogpeppe
- License: bsd-3-clause
- Created: 2015-05-11T12:02:56.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-10-26T20:11:41.000Z (over 9 years ago)
- Last Synced: 2025-03-18T06:51:25.692Z (2 months ago)
- Language: Go
- Homepage:
- Size: 438 KB
- Stars: 5
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
The rjson package implements a backwardly compatible version of JSON with
the aim of making it easier for humans to read and write. There is also an rjson
command (in cmd/rjson) that reads and writes this format.The data model is exactly that of JSON's and this package implements all
the marshalling and unmarshalling operations supported by the standard
library's json package.The three principal differences are:
- Quotes may be omitted for some object key values (see below).
- Commas are automatically inserted when a newline
is encountered after a value (but not an object key).- Commas are optional at the end of an array or object.
The quotes around an object key may be omitted if the key matches the
following regular expression:[a-zA-Z][a-zA-Z0-9\-_]*
This rule may be relaxed in the future to allow unicode characters,
probably following the same rules as Go's identifiers, and probably a
few more non-alphabetical characters.