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

Conflicts

None

OCaml

Innovation. Community. Security.