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. frenetic >= "3.2.0" & < "5.0.5"
  43. fstar >= "0.9.3.0-beta1"
  44. gapi-ocaml < "0.4.3"
  45. gdbprofiler >= "0.2" & < "0.4"
  46. gemini < "0.3.0"
  47. gen-bs >= "0.1.0"
  48. github < "4.1.0"
  49. goblint < "1.1.1"
  50. goblint-cil >= "1.8.0"
  51. graphql < "0.14.0"
  52. graphql_ppx < "1.2.2"
  53. h2
  54. hilite < "0.3.0"
  55. hl_yaml
  56. hockmd
  57. horned_worm < "0.3.5"
  58. hpack
  59. hsluv
  60. index-bench
  61. iocaml
  62. iocaml-kernel
  63. irmin-bench < "3.0.0"
  64. irmin-graphql >= "2.2.0"
  65. irmin-tezos
  66. jhupllib < "0.2.2"
  67. jose < "0.7.0"
  68. js_of_ocaml = "2.8.4"
  69. js_of_ocaml-compiler
  70. json-pointer
  71. json-predicate
  72. json-rpc
  73. json_decoder
  74. jsondiff
  75. jsonrpc < "1.6.0"
  76. jsonschema2atd
  77. jupyter < "2.7.0"
  78. jupyter-kernel < "0.5"
  79. jwt
  80. jwto < "0.2.0"
  81. KaSim >= "4.0.0"
  82. karamel
  83. ketrew
  84. kind2
  85. kremlin < "transition"
  86. kubecaml
  87. lablqt
  88. learn-ocaml
  89. lsp
  90. merlin < "3.3.3"
  91. merlin-acme
  92. mezzo
  93. minimal >= "1.1.0"
  94. monorobot
  95. morbig < "0.10.4"
  96. netml
  97. nsq >= "0.2.4"
  98. obuilder < "0.4"
  99. ocaml-gist
  100. ocaml-lsp-server
  101. ocaml-protoc-yojson
  102. ocaml-webworker
  103. ocf < "0.6.0"
  104. oclaunch < "0.2.1"
  105. ocsigen-start < "1.7.0"
  106. odoc >= "2.0.0" & < "2.3.0"
  107. oframl
  108. ogen
  109. oidc
  110. ojs-base != "0.2.0" & < "0.6.0"
  111. openai-gym
  112. oraft
  113. orun
  114. ozulip
  115. pds-reachability < "0.2.3"
  116. petr4
  117. phylogenetics >= "0.2.0"
  118. pkcs11 >= "0.9.0" & < "1.0.0"
  119. plist
  120. podge
  121. ppx_deriving_protocol < "0.8.1"
  122. ppx_deriving_yojson < "3.4"
  123. ppx_graphql
  124. ppx_json_types
  125. ppx_protocol_conv < "3.1.0"
  126. ppx_protocol_conv_json < "3.1.3"
  127. ppx_yojson < "1.0.0"
  128. prof_spacetime
  129. qmp < "0.19.0"
  130. quests
  131. r2pipe
  132. radare2
  133. rdf >= "0.9.0" & < "0.12.0"
  134. records < "1.0.0"
  135. repr-bench
  136. rpc = "2.2.0"
  137. rpclib < "6.1.0"
  138. rubytt
  139. rungen
  140. SZXX
  141. safemoney
  142. satyrographos
  143. semver2
  144. sentry
  145. slack
  146. slacko
  147. slug
  148. sparrow
  149. sphinxcontrib-ocaml
  150. spotify-web-api
  151. stitch
  152. swagger
  153. tdigest < "2.1.0"
  154. telegraml
  155. testrunner
  156. textrazor < "0.1.1"
  157. tezos-context-hash-irmin
  158. themoviedb
  159. transmission-rpc
  160. u2f
  161. usbmux
  162. vecosek
  163. vecosek-scene
  164. vercel
  165. vscoq-language-server
  166. wamp < "1.0"
  167. wamp-yojson
  168. webauthn
  169. xapi-rrd >= "1.9.0"

Conflicts (1)

  1. dune >= "1.7.0"