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. 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-plugin >= "6.1.0"
  103. ocaml-protoc-yojson
  104. ocaml-webworker
  105. ocf < "0.6.0"
  106. oclaunch < "0.2.1"
  107. ocsigen-start < "1.7.0"
  108. odoc >= "2.0.0" & < "2.3.0"
  109. oframl
  110. ogen
  111. oidc
  112. ojs-base != "0.2.0" & < "0.6.0"
  113. openai-gym
  114. oraft
  115. orun
  116. ozulip
  117. pds-reachability < "0.2.3"
  118. petr4
  119. phylogenetics >= "0.2.0"
  120. pkcs11 >= "0.9.0" & < "1.0.0"
  121. plist
  122. podge
  123. ppx_deriving_protocol < "0.8.1"
  124. ppx_deriving_yojson < "3.4"
  125. ppx_graphql
  126. ppx_json_types
  127. ppx_protocol_conv < "3.1.0"
  128. ppx_protocol_conv_json < "3.1.3"
  129. ppx_yojson < "1.0.0"
  130. prof_spacetime
  131. qmp < "0.19.0"
  132. quests
  133. r2pipe
  134. radare2
  135. rdf >= "0.9.0" & < "0.12.0"
  136. records < "1.0.0"
  137. repr-bench
  138. rpc = "2.2.0"
  139. rpclib < "6.1.0"
  140. rubytt
  141. rungen
  142. SZXX
  143. safemoney
  144. satyrographos
  145. semver2
  146. sentry
  147. slack
  148. slacko
  149. slug
  150. sparrow
  151. sphinxcontrib-ocaml
  152. spotify-web-api
  153. stitch
  154. swagger
  155. tdigest < "2.1.0"
  156. telegraml
  157. testrunner
  158. textrazor < "0.1.1"
  159. tezos-context-hash-irmin
  160. themoviedb
  161. transmission-rpc
  162. u2f
  163. usbmux
  164. vecosek
  165. vecosek-scene
  166. vercel
  167. vscoq-language-server
  168. wamp < "1.0"
  169. wamp-yojson
  170. webauthn
  171. xapi-rrd >= "1.9.0"

Conflicts (1)

  1. dune >= "1.7.0"
OCaml

Innovation. Community. Security.