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

Conflicts

None

OCaml

Innovation. Community. Security.