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

Conflicts

None

OCaml

Innovation. Community. Security.