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

Conflicts (1)

  1. dune >= "1.7.0"
OCaml

Innovation. Community. Security.