package yojson

  1. Overview
  2. Docs
Yojson is an optimized parsing and printing library for the JSON format

Install

dune-project
 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

Build Status

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
  3. anthropic
  4. apero-core
  5. apero-net
  6. archetype
  7. atd >= "2.6.0"
  8. atdgen < "2.10.0"
  9. atdgen-runtime < "2.10.0"
  10. avro-compiler
  11. aws-config
  12. aws-s3 < "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. calculon-web = "0.6"
  22. camelot >= "1.3.0"
  23. camels
  24. canary
  25. cb-check
  26. cbor
  27. cconv-ppx
  28. chess_com_api
  29. colibrics
  30. comby
  31. comby-kernel
  32. comby-semantic
  33. commons
  34. containers >= "3.9"
  35. coq-lsp
  36. coq-of-ocaml
  37. coq-serapi >= "8.10.0+0.7.0" & < "8.20.0+0.20.0"
  38. current_docker
  39. current_examples
  40. current_git
  41. current_github
  42. current_gitlab
  43. current_slack
  44. current_ssh
  45. current_web
  46. dap
  47. daypack-lib
  48. dblp-api
  49. decoders-yojson
  50. devkit
  51. dnsrobot
  52. docker-api
  53. docker_hub
  54. dot-merlin-reader < "4.9"
  55. dream
  56. dream-inertia
  57. dropbox
  58. dune-release >= "1.4.0"
  59. elasticsearch-cli = "0.5"
  60. elpi >= "3.3.1"
  61. esgg
  62. fiat-p256
  63. frama-c
  64. fred
  65. frenetic
  66. fstar
  67. gapi-ocaml
  68. gdbprofiler
  69. gemini < "0.3.0"
  70. gendarme-json < "0.4.0"
  71. gendarme-yojson
  72. github
  73. github-data
  74. github-unix < "4.5.1"
  75. gitlab
  76. goblint-cil >= "1.8.0"
  77. gopcaml-mode-merlin < "0.0.6"
  78. graphql
  79. graphql-async >= "0.14.0"
  80. graphql-cohttp >= "0.13.0"
  81. graphql-lwt >= "0.14.0"
  82. graphql_ppx
  83. gremlin
  84. h2
  85. hacl_x25519
  86. hilite < "0.3.0"
  87. hl_yaml
  88. hockmd
  89. horned_worm
  90. hpack
  91. hsluv
  92. httph
  93. huml
  94. huml-cli
  95. index-bench
  96. ip2location
  97. ip2locationio
  98. irmin-graphql
  99. irmin-tezos
  100. jasmin
  101. jhupllib
  102. jose
  103. js_of_ocaml-compiler < "6.0.1"
  104. json-rpc
  105. json_decoder
  106. jsondiff
  107. jsonrpc < "1.6.0"
  108. jsonschema
  109. jsonschema2atd
  110. jupyter
  111. jupyter-kernel
  112. jwt
  113. jwto
  114. kappa-library < "4.1.3"
  115. karamel
  116. kind2
  117. kremlin < "transition"
  118. kubecaml
  119. lablgtk3-extras >= "3.0.1"
  120. lambda-runtime
  121. lambdapi
  122. learn-ocaml
  123. letsencrypt < "2.0.0"
  124. letters
  125. libsail
  126. lichess_api
  127. linol >= "0.2"
  128. linol-eio
  129. linol-lwt
  130. lsp
  131. melange-json = "1.2.0"
  132. melange-json-native
  133. merlin = "4.5-411"
  134. mirage-crypto-ec
  135. monorobot
  136. mopsa
  137. morbig
  138. nats-client
  139. nats-client-async >= "0.0.10"
  140. nloge
  141. nsq
  142. obuilder
  143. ocaml-lsp-server
  144. ocaml-protoc-plugin >= "6.1.0"
  145. ocaml-protoc-yojson
  146. ocaml_db_model
  147. ocaml_pgsql_model
  148. ocf
  149. ocsigen-start
  150. odoc = "2.1.1"
  151. oframl
  152. ogen
  153. oidc
  154. ojs-base
  155. ojs_base
  156. ometrics < "0.2.0"
  157. opam-check-npm-deps >= "4.1.0"
  158. openai-gym
  159. openapi < "1.0.0"
  160. openapi_router
  161. openstellina
  162. opium >= "0.19.0"
  163. oraft
  164. orun
  165. osh
  166. oui
  167. ozulip
  168. pa_ppx < "0.19"
  169. pbrt_yojson
  170. pds-reachability
  171. petr4
  172. pgn_parser
  173. phylogenetics >= "0.2.0"
  174. pkcs11
  175. pkcs11-driver >= "1.0.0"
  176. plist
  177. podge
  178. ppx_deriving_jsonschema
  179. ppx_deriving_yojson
  180. ppx_protocol_conv_json
  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 < "1.0.0"
  190. records
  191. repr-bench
  192. rescriptdep
  193. rpclib
  194. rungen
  195. SZXX
  196. safemoney
  197. sail < "0.15"
  198. satyrographos
  199. savvy
  200. semver2
  201. sentry
  202. sihl < "0.2.0" | >= "0.3.0~rc2"
  203. sihl-core
  204. simple_httpd
  205. slack
  206. slacko
  207. slug
  208. smtml >= "0.7.0"
  209. snf_mcp
  210. spectrum_palette_ppx
  211. spotify-web-api
  212. stitch
  213. swagger
  214. tdigest < "2.1.0"
  215. telegraml
  216. textmate-language >= "0.3.0"
  217. textrazor
  218. tidy_email_sendgrid
  219. timedesc < "0.8.0"
  220. timedesc-json
  221. timere < "0.4.0"
  222. user-agent-parser
  223. vecosek
  224. vecosek-scene
  225. vercel
  226. vscoq-language-server < "2.3.3"
  227. vsrocq-language-server
  228. wamp < "1.0"
  229. wamp-yojson
  230. webauthn
  231. why3find
  232. xapi-rrd >= "1.9.0"
  233. yultracer
  234. zarr

Conflicts

None