package yojson

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

Install

Dune Dependency

Authors

Maintainers

Sources

yojson-1.5.0.tbz
sha256=70a0f972fedebd736546eae832e255753d3214a8b3283597ae112577d70c8b33
md5=d80de1bacdde292af42f7c78b323da7b

Description

Yojson is an optimized parsing and printing library for the JSON format.

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: 27 Dec 2018

README

Yojson: low-level JSON library for OCaml

This library is for manipulating the json AST directly. For mapping between OCaml types and json, we recommend atdgen.

Library documentation

Currently at https://ocaml-community.github.io/yojson/

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

Conflicts

None

OCaml

Innovation. Community. Security.