package yojson

  1. Overview
  2. Docs
Yojson is an optimized parsing and printing library for the JSON format

Install

Dune Dependency

Authors

Maintainers

Sources

v1.4.0.tar.gz
sha256=7d06340b769ed6ff5b2171a0e820d1e8f4337aef3929090fc976efe845639146
md5=729b5e15b2f7c1cb7d402bc301d06d0e

Description

It addresses a few shortcomings of json-wheel including 2x speedup, polymorphic variants and optional syntax for tuples and variants.

ydump is a pretty-printing command-line program provided with the yojson package.

The program atdgen can be used to derive OCaml-JSON serializers and deserializers from type definitions.

Published: 19 Jul 2017

README

Yojson: JSON library for OCaml

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): <Foo> <Bar:"abc">

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

Dependencies (5)

  1. biniou >= "1.2.0"
  2. easy-format
  3. cppo build
  4. jbuilder >= "1.0+beta7"
  5. ocaml >= "4.02.3"

Dev Dependencies

None

  1. 0install < "2.18"
  2. acgtk < "1.5.3"
  3. archetype < "1.2.5"
  4. atdgen < "2.2.1"
  5. atdgen-runtime < "2.2.1"
  6. aws-s3 < "4.5.1" | >= "4.8.0"
  7. bap-radare2
  8. bitcoin < "3.0"
  9. boulangerie
  10. builder-web >= "0.2.0"
  11. calculon-redis-lib
  12. camels
  13. canary
  14. cb-check
  15. cbor < "0.3"
  16. cconv-ppx
  17. colibrics
  18. comby
  19. comby-kernel
  20. comby-semantic
  21. containers >= "3.9"
  22. current_docker
  23. current_git
  24. current_github
  25. current_gitlab
  26. current_slack
  27. current_ssh
  28. dap
  29. daypack-lib
  30. dblp-api
  31. decoders-yojson < "0.7.0"
  32. devkit < "1.2"
  33. disml
  34. docker-api < "0.2.2"
  35. dream
  36. dream-inertia
  37. frama-c < "23.0"
  38. fred
  39. fstar
  40. gapi-ocaml < "0.4.3"
  41. gdbprofiler < "0.4"
  42. gemini < "0.3.0"
  43. github < "4.1.0"
  44. goblint-cil >= "1.8.0"
  45. graphql < "0.14.0"
  46. graphql_ppx < "1.2.2"
  47. h2
  48. hilite < "0.3.0"
  49. hl_yaml
  50. hockmd
  51. hpack
  52. hsluv
  53. index-bench
  54. irmin-bench < "3.0.0"
  55. irmin-graphql >= "2.2.0"
  56. irmin-tezos
  57. jhupllib < "0.2.2"
  58. js_of_ocaml-compiler < "5.9.0"
  59. json-rpc
  60. json_decoder
  61. jsondiff
  62. jsonrpc < "1.6.0"
  63. jsonschema2atd
  64. jupyter < "2.7.0"
  65. jupyter-kernel < "0.5"
  66. jwt
  67. jwto < "0.2.0"
  68. karamel
  69. kind2
  70. kremlin < "transition"
  71. learn-ocaml
  72. lsp
  73. merlin < "3.3.3"
  74. monorobot
  75. morbig < "0.10.4"
  76. nsq
  77. obuilder < "0.4"
  78. ocaml-lsp-server
  79. ocaml-protoc-plugin >= "6.1.0"
  80. ocaml-protoc-yojson
  81. odoc >= "2.0.0" & < "2.3.0"
  82. oframl
  83. ogen
  84. oidc
  85. openai-gym
  86. oraft
  87. orun
  88. ozulip
  89. pds-reachability < "0.2.3"
  90. petr4
  91. phylogenetics = "0.2.0"
  92. pkcs11 < "1.0.0"
  93. plist
  94. podge
  95. ppx_deriving_jsonschema
  96. ppx_yojson < "1.0.0"
  97. prof_spacetime
  98. qmp < "0.19.0"
  99. quests
  100. r2pipe
  101. radare2
  102. rdf < "0.12.0"
  103. records < "1.0.0"
  104. repr-bench
  105. rpclib < "6.1.0"
  106. rungen
  107. SZXX
  108. safemoney
  109. satyrographos
  110. savvy
  111. sentry
  112. slack
  113. slacko
  114. slug
  115. spotify-web-api
  116. stitch
  117. tdigest < "2.1.0"
  118. telegraml
  119. textrazor < "0.1.1"
  120. tezos-context-hash-irmin
  121. u2f
  122. vecosek
  123. vecosek-scene
  124. vercel
  125. vscoq-language-server
  126. wamp < "1.0"
  127. wamp-yojson
  128. webauthn
  129. xapi-rrd >= "1.9.0"

Conflicts (1)

  1. dune >= "1.7.0"
OCaml

Innovation. Community. Security.