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.1.tar.gz
md5=3ea6e36422dd670e8ab880710d5f7398

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: 24 Feb 2018

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.3.2" & < "1.5.3"
  3. archetype < "1.2.5"
  4. atdgen < "2.2.1"
  5. atdgen-runtime < "2.2.1"
  6. aws < "1.0.0"
  7. aws-s3 < "4.5.1" | >= "4.8.0"
  8. bap-radare2
  9. bitcoin < "3.0"
  10. boulangerie
  11. calculon < "0.6"
  12. calculon-redis-lib
  13. camels
  14. canary
  15. cb-check
  16. cbor < "0.3"
  17. cconv-ppx
  18. colibrics
  19. comby
  20. comby-kernel
  21. comby-semantic
  22. containers >= "3.9"
  23. current_docker
  24. current_git
  25. current_github
  26. current_gitlab
  27. current_slack
  28. current_ssh
  29. dap
  30. datakit-ci = "0.12.0"
  31. daypack-lib
  32. decoders-yojson < "0.7.0"
  33. deriving-yojson
  34. devkit >= "0.4" & < "1.2"
  35. disml
  36. docker-api < "0.2.2"
  37. dream
  38. earlybird < "1.0.0"
  39. facebook-sdk < "0.3.1"
  40. fkie-cad-cwe-checker < "0.2"
  41. frama-c >= "19.0" & < "23.0"
  42. fred
  43. frenetic >= "3.2.0" & < "5.0.5"
  44. fstar >= "0.9.3.0-beta1"
  45. gapi-ocaml < "0.4.3"
  46. gdbprofiler >= "0.2" & < "0.4"
  47. gemini < "0.3.0"
  48. gen-bs >= "0.1.0"
  49. github < "4.1.0"
  50. goblint < "1.1.1"
  51. goblint-cil >= "1.8.0"
  52. graphql < "0.14.0"
  53. graphql_ppx < "1.2.2"
  54. h2
  55. hilite < "0.3.0"
  56. hl_yaml
  57. hockmd
  58. horned_worm < "0.3.5"
  59. hpack
  60. hsluv
  61. index-bench
  62. iocaml
  63. iocaml-kernel
  64. irmin-bench < "3.0.0"
  65. irmin-graphql >= "2.2.0"
  66. irmin-tezos
  67. jhupllib < "0.2.2"
  68. jose < "0.7.0"
  69. js_of_ocaml = "2.8.4"
  70. js_of_ocaml-compiler
  71. json-pointer
  72. json-predicate
  73. json-rpc
  74. json_decoder
  75. jsondiff
  76. jsonrpc < "1.6.0"
  77. jsonschema2atd
  78. jupyter < "2.7.0"
  79. jupyter-kernel < "0.5"
  80. jwt
  81. jwto < "0.2.0"
  82. KaSim >= "4.0.0"
  83. karamel
  84. ketrew
  85. kind2
  86. kremlin < "transition"
  87. kubecaml
  88. lablqt
  89. learn-ocaml
  90. lsp
  91. merlin < "3.3.3"
  92. merlin-acme
  93. mezzo
  94. minimal >= "1.1.0"
  95. monorobot
  96. morbig < "0.10.4"
  97. netml
  98. nsq >= "0.2.4"
  99. obuilder < "0.4"
  100. ocaml-gist
  101. ocaml-lsp-server
  102. ocaml-protoc-yojson
  103. ocaml-webworker
  104. ocf < "0.6.0"
  105. oclaunch < "0.2.1"
  106. ocsigen-start < "1.7.0"
  107. odoc >= "2.0.0" & < "2.3.0"
  108. oframl
  109. ogen
  110. oidc
  111. ojs-base != "0.2.0" & < "0.6.0"
  112. openai-gym
  113. oraft
  114. orun
  115. ozulip
  116. pds-reachability < "0.2.3"
  117. petr4
  118. phylogenetics >= "0.2.0"
  119. pkcs11 >= "0.9.0" & < "1.0.0"
  120. plist
  121. podge
  122. ppx_deriving_protocol < "0.8.1"
  123. ppx_deriving_yojson < "3.4"
  124. ppx_graphql
  125. ppx_json_types
  126. ppx_protocol_conv < "3.1.0"
  127. ppx_protocol_conv_json < "3.1.3"
  128. ppx_yojson < "1.0.0"
  129. prof_spacetime
  130. qmp < "0.19.0"
  131. quests
  132. r2pipe
  133. radare2
  134. rdf >= "0.9.0" & < "0.12.0"
  135. records < "1.0.0"
  136. repr-bench
  137. rpc = "2.2.0"
  138. rpclib < "6.1.0"
  139. rubytt
  140. rungen
  141. SZXX
  142. safemoney
  143. satyrographos
  144. semver2
  145. sentry
  146. slack
  147. slacko
  148. slug
  149. sparrow
  150. sphinxcontrib-ocaml
  151. spotify-web-api
  152. stitch
  153. swagger
  154. tdigest < "2.1.0"
  155. telegraml
  156. testrunner
  157. textrazor < "0.1.1"
  158. tezos-context-hash-irmin
  159. themoviedb
  160. transmission-rpc
  161. u2f
  162. usbmux
  163. vecosek
  164. vecosek-scene
  165. vercel
  166. vscoq-language-server
  167. wamp < "1.0"
  168. wamp-yojson
  169. webauthn
  170. xapi-rrd >= "1.9.0"

Conflicts (1)

  1. dune >= "1.7.0"