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-lwt
  129. lsp
  130. merlin != "3.8.0" & < "4.6-412"
  131. merlin-acme
  132. mezzo
  133. minimal >= "1.1.0"
  134. mirage-crypto-ec
  135. monorobot
  136. morbig
  137. netml
  138. nloge
  139. nsq >= "0.2.4"
  140. obuilder
  141. ocaml-gist
  142. ocaml-lsp-server
  143. ocaml-protoc-plugin >= "6.1.0"
  144. ocaml-protoc-yojson
  145. ocaml-webworker
  146. ocaml_db_model
  147. ocaml_pgsql_model
  148. ocf
  149. oclaunch < "0.2.1"
  150. ocsigen-start
  151. odoc >= "2.0.0"
  152. oframl
  153. ogen
  154. oidc
  155. ojs-base != "0.2.0"
  156. ojs_base
  157. ometrics < "0.2.0"
  158. opam2web >= "2.0"
  159. openai-gym
  160. openapi
  161. openapi_router
  162. openstellina
  163. opium >= "0.19.0"
  164. oraft
  165. orun
  166. osh
  167. ozulip
  168. pa_ppx
  169. pbrt_yojson
  170. pds-reachability
  171. petr4
  172. phylogenetics >= "0.2.0"
  173. pkcs11 >= "0.9.0" & < "1.0.0"
  174. pkcs11-driver >= "1.0.0"
  175. plist
  176. podge
  177. ppx_deriving_protocol < "0.8.1"
  178. ppx_deriving_yojson >= "3.4"
  179. ppx_graphql
  180. ppx_json_types
  181. ppx_protocol_conv = "2.0.0"
  182. ppx_protocol_conv_json >= "3.1.3"
  183. ppx_yojson
  184. ppx_yojson_conv < "v0.13.0"
  185. ppx_yojson_conv_lib
  186. prof_spacetime
  187. qmp
  188. quests
  189. r2pipe
  190. radare2
  191. rdf >= "0.9.0" & < "1.0.0"
  192. records
  193. repr-bench
  194. rpc = "2.2.0"
  195. rpclib
  196. rubytt
  197. rungen
  198. SZXX
  199. safemoney
  200. sail < "0.15"
  201. satyrographos
  202. semver2
  203. sentry
  204. sihl < "0.2.0" | >= "0.3.0~rc2"
  205. sihl-core
  206. slack
  207. slacko
  208. slug
  209. sparrow
  210. sphinxcontrib-ocaml
  211. spotify-web-api
  212. stitch
  213. swagger
  214. tdigest < "2.1.0"
  215. telegraml
  216. testrunner
  217. textmate-language >= "0.3.0"
  218. textrazor
  219. tezos-context-hash-irmin
  220. themoviedb
  221. tidy_email_sendgrid
  222. timedesc < "0.8.0"
  223. timedesc-json
  224. timere < "0.4.0"
  225. transmission-rpc
  226. u2f
  227. usbmux
  228. user-agent-parser
  229. vecosek
  230. vecosek-scene
  231. vercel
  232. vscoq-language-server
  233. wamp < "1.0"
  234. wamp-yojson
  235. webauthn
  236. why3find
  237. xapi-rrd >= "1.9.0"

Conflicts

None

OCaml

Innovation. Community. Security.