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.7.0.tbz
sha256=656fc65f794186274f8b961dc38daba9e2de2fc993829291defbda2186812cc6
md5=b89d39ca3f8c532abe5f547ad3b8f84d

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

Conflicts

None

OCaml

Innovation. Community. Security.