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

Conflicts

None