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

Conflicts

None