https://github.com/gfngfn/yojson-with-position
A fork of yojson used by SATySFi
https://github.com/gfngfn/yojson-with-position
Last synced: 7 months ago
JSON representation
A fork of yojson used by SATySFi
- Host: GitHub
- URL: https://github.com/gfngfn/yojson-with-position
- Owner: gfngfn
- License: other
- Created: 2020-06-07T11:58:33.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-07T13:13:29.000Z (over 5 years ago)
- Last Synced: 2025-01-16T00:00:07.454Z (9 months ago)
- Language: OCaml
- Size: 607 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE.md
Awesome Lists containing this project
README
Yojson: low-level JSON library for OCaml
========================================_This library is for manipulating the json AST directly. For mapping between OCaml types and json, we recommend [atdgen](https://github.com/mjambon/atd)._
Library documentation
---------------------Currently at https://mjambon.github.io/mjambon2016/yojson-doc/Yojson.html
_The link above is for the ocamldoc-generated of some past version of yojson. Suggestions on how to keep this documentation updated automatically for each minor release are welcome._
Design goals
------------* reducing inter-package dependencies by the use of polymorphic
variants for the JSON tree type* allowing variants of the JSON tree type to be shipped by the library
itself or to be easily created as extensions of the library* allowing type-aware serializers/deserializers such as json-static
to read and write directly without going through a JSON tree,
for efficiency purposes.
This requires making readers and writers of JSON atoms (int, string,
etc.) to be exported and composable.* providing a few non-standard, optional extensions of JSON.
These extensions will include:
* optional quotes around "simple" field/constructor names
* a syntax for tuples (at least 2 elements): `(x, y)`
* a syntax for variants (0 or 1 arg only): ` `Other choices already in json-wheel
-----------------------------------* distinction between ints and floats (optional)
* Getting rid of the UTF-X encoding constraint that prevents from
exchanging binary data:
* encoding is ASCII except for the contents of string literals
* string literals may represent arbitrary sequence of bytes
* `\uABCD` escapes in string literals expand to UTF-8Miscellaneous
-------------* no dependency on ocamlnet for UTF-8