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.6.0.tbz
md5=8ca16557d3068253cc375452af3bde96

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: 31 Jan 2019

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 (1)

  1. alcotest with-test & >= "0.8.5"

  1. 0install < "2.18"
  2. acgtk >= "1.3.2"
  3. archetype
  4. atd >= "2.6.0"
  5. atdgen < "2.2.1"
  6. atdgen-runtime < "2.2.1"
  7. avro-compiler
  8. aws < "1.0.0"
  9. aws-config
  10. aws-s3 >= "1.1.0" & < "4.5.1" | >= "4.8.0"
  11. awsm-codegen
  12. bap-radare2
  13. bitcoin
  14. boulangerie
  15. calculon < "0.7"
  16. calculon-redis-lib
  17. camels
  18. canary
  19. cb-check
  20. cbor
  21. cconv-ppx
  22. colibrics
  23. comby
  24. comby-kernel
  25. comby-semantic
  26. containers >= "3.9"
  27. coq-of-ocaml
  28. current_docker
  29. current_git
  30. current_github
  31. current_gitlab
  32. current_slack
  33. current_ssh
  34. cwe_checker
  35. dap
  36. daypack-lib
  37. decoders-yojson
  38. deriving-yojson
  39. devkit >= "0.4"
  40. docker-api
  41. docker_hub
  42. dot-merlin-reader != "4.4~5.0.preview" & < "4.6"
  43. dream
  44. dropbox >= "0.2"
  45. dune-release >= "1.4.0"
  46. earlybird < "1.0.0"
  47. facebook-sdk < "0.3.1"
  48. fiat-p256
  49. frama-c >= "19.0"
  50. fred
  51. frenetic >= "3.2.0" & < "5.0.5"
  52. fstar >= "0.9.3.0-beta1"
  53. gapi-ocaml
  54. gdbprofiler >= "0.2"
  55. gemini < "0.3.0"
  56. gen-bs >= "0.1.0"
  57. github < "4.3.2"
  58. goblint-cil >= "1.8.0"
  59. gopcaml-mode-merlin < "0.0.6"
  60. graphql
  61. graphql-async >= "0.14.0"
  62. graphql-cohttp >= "0.13.0"
  63. graphql-lwt >= "0.14.0"
  64. graphql_ppx
  65. h2
  66. hacl_x25519
  67. hilite < "0.3.0"
  68. hl_yaml
  69. hockmd
  70. horned_worm
  71. hpack
  72. hsluv
  73. index-bench
  74. iocaml
  75. iocaml-kernel
  76. ip2location
  77. ip2locationio
  78. irmin-bench < "3.0.0"
  79. irmin-graphql >= "2.2.0"
  80. irmin-tezos
  81. jasmin
  82. jhupllib < "0.2.2"
  83. jose
  84. js_of_ocaml = "2.8.4"
  85. js_of_ocaml-compiler
  86. json-pointer
  87. json-predicate
  88. json-rpc
  89. json_decoder
  90. jsondiff
  91. jsonrpc < "1.6.0"
  92. jsonschema2atd
  93. jupyter
  94. jupyter-kernel < "0.8"
  95. jwt
  96. jwto
  97. KaSim >= "4.0.0"
  98. kappa-library
  99. karamel
  100. ketrew
  101. kind2
  102. kremlin < "transition"
  103. kubecaml
  104. lablqt
  105. lambda-runtime
  106. lambdapi >= "2.0.0"
  107. learn-ocaml
  108. letsencrypt
  109. libsail
  110. linol >= "0.2"
  111. linol-lwt
  112. lsp
  113. merlin != "3.8.0" & < "4.6-412"
  114. merlin-acme
  115. mezzo
  116. minimal >= "1.1.0"
  117. mirage-crypto-ec
  118. monorobot
  119. morbig
  120. netml
  121. nloge
  122. nsq >= "0.2.4"
  123. obuilder
  124. ocaml-gist
  125. ocaml-lsp-server
  126. ocaml-protoc-plugin >= "6.1.0"
  127. ocaml-protoc-yojson
  128. ocaml-webworker
  129. ocf < "0.6.0"
  130. oclaunch < "0.2.1"
  131. ocsigen-start
  132. odoc >= "2.0.0"
  133. oframl
  134. ogen
  135. oidc
  136. ojs-base != "0.2.0" & < "0.6.0"
  137. opam2web >= "2.0"
  138. openai-gym
  139. opium >= "0.19.0"
  140. oraft
  141. orun
  142. ozulip
  143. pbrt_yojson
  144. pds-reachability < "0.2.3"
  145. petr4
  146. phylogenetics >= "0.2.0"
  147. pkcs11 >= "0.9.0" & < "1.0.0"
  148. pkcs11-driver >= "1.0.0"
  149. plist
  150. podge
  151. ppx_deriving_protocol < "0.8.1"
  152. ppx_deriving_yojson >= "3.4"
  153. ppx_graphql
  154. ppx_json_types
  155. ppx_protocol_conv = "2.0.0"
  156. ppx_protocol_conv_json >= "3.1.3"
  157. ppx_yojson
  158. prof_spacetime
  159. qmp
  160. quests
  161. r2pipe
  162. radare2
  163. rdf >= "0.9.0" & < "0.12.0"
  164. records
  165. repr-bench
  166. rpc = "2.2.0"
  167. rpclib < "6.1.0"
  168. rubytt
  169. rungen
  170. SZXX
  171. safemoney
  172. sail < "0.15"
  173. satyrographos
  174. semver2
  175. sentry
  176. slack
  177. slacko
  178. slug
  179. sparrow
  180. sphinxcontrib-ocaml
  181. spotify-web-api
  182. stitch
  183. swagger
  184. tdigest < "2.1.0"
  185. telegraml
  186. testrunner
  187. textrazor
  188. tezos-context-hash-irmin
  189. themoviedb
  190. timedesc < "0.8.0"
  191. timedesc-json
  192. timere < "0.4.0"
  193. transmission-rpc
  194. u2f
  195. usbmux
  196. user-agent-parser
  197. vecosek
  198. vecosek-scene
  199. vercel
  200. vscoq-language-server
  201. wamp < "1.0"
  202. wamp-yojson
  203. webauthn
  204. xapi-rrd >= "1.9.0"

Conflicts

None

OCaml

Innovation. Community. Security.