Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
JSON parsing and pretty-printing library for OCaml
branch: master

Merge pull request #15 from whitequark/master

Only invoke ocaml tools via ocamlfind
latest commit cd376c5322
Martin Jambon authored
Failed to load latest commit information.
examples Added exception-free filters
Changes Version 1.2.0
INSTALL Added INSTALL file.
LICENSE Added license and version to ydump output.
META.in check native dynlink support
Makefile Only invoke ocaml tools via ocamlfind.
README.md Markdowned readme
bench.ml "-s" is now the default for ydump; "-u" must be used for the old
common.ml Fixed problem happening when writing 31-bit code points on 32-bit hosts
common.mli Added license and version to ydump output.
pretty.ml "-s" is now the default for ydump; "-u" must be used for the old
pretty.mli "-s" is now the default for ydump; "-u" must be used for the old
read.mli Read: add buffer_json to defer parsing
read.mll Read: add buffer_json to defer parsing
safe.ml "-s" is now the default for ydump; "-u" must be used for the old
safe.mli "-s" is now the default for ydump; "-u" must be used for the old
sample.json Added benchmark program (comparison with json-wheel).
test.json Added proper support for escaped Unicode code points beyond U+FFFF,
type.ml "-s" is now the default for ydump; "-u" must be used for the old
util.ml Added exception-free filters
util.mli Util.to_assoc: fix documentation error
write.ml New behavior for write_float_prec and write_std_float_prec: print given
write.mli New functions write_float_prec and write_std_float_prec
write2.ml "-s" is now the default for ydump; "-u" must be used for the old
write2.mli "-s" is now the default for ydump; "-u" must be used for the old
ydump.ml Function and command-line option for sorting JSON object fields
yojson.ml.cppo Decouple biniou-related functionality from JSON-only functionality by…
yojson.mli.cppo Decouple biniou-related functionality from JSON-only functionality by…
yojson_biniou.ml New functions write_float_prec and write_std_float_prec
yojson_biniou.mli "-s" is now the default for ydump; "-u" must be used for the old

README.md

Yojson: JSON library for OCaml

The main project page is http://mjambon.com/yojson.html Yojson supersedes json-wheel.

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-8

Miscellaneous

  • no dependency on ocamlnet for UTF-8
Something went wrong with that request. Please try again.