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.

Added to opam-repository:

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. archetype
  5. atd >= "2.6.0"
  6. atdgen < "2.10.0"
  7. atdgen-runtime < "2.10.0"
  8. avro-compiler
  9. aws-config
  10. aws-s3 < "4.5.1" | >= "4.8.0"
  11. awskit-lwt-unix
  12. awskit-s3
  13. awsm-codegen
  14. bap-radare2
  15. bitcoin
  16. bitflyer
  17. boulangerie
  18. builder-web >= "0.2.0"
  19. cabal
  20. caisar
  21. calculon
  22. camelot >= "1.4.2"
  23. camels
  24. canary
  25. cb-check
  26. cbor
  27. chess_com_api
  28. colibrics
  29. comby
  30. comby-kernel
  31. comby-semantic
  32. commons
  33. containers >= "3.9"
  34. coq-lsp
  35. coq-of-ocaml
  36. coq-serapi < "8.20.0+0.20.0"
  37. current_docker
  38. current_examples
  39. current_git
  40. current_github
  41. current_gitlab
  42. current_slack
  43. current_ssh
  44. current_web
  45. dap
  46. daypack-lib
  47. dblp-api
  48. decoders-yojson
  49. devkit
  50. dnsrobot
  51. docker-api
  52. docker_hub
  53. dot-merlin-reader < "4.9"
  54. dream
  55. dream-inertia
  56. dropbox
  57. dune-release >= "1.4.0"
  58. ecma-regex
  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. gendarme-json < "0.4.0"
  70. gendarme-yojson
  71. github
  72. github-data
  73. github-unix < "4.5.1"
  74. gitlab
  75. gmocoin
  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. hegel
  87. hilite < "0.3.0"
  88. hl_yaml
  89. hockmd
  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. jsonkit
  108. jsonrpc < "1.6.0"
  109. jsonschema
  110. jsonschema2atd
  111. jupyter
  112. jupyter-kernel
  113. jwt
  114. jwto
  115. kappa-library < "4.1.3"
  116. karamel
  117. kind2
  118. kremlin < "transition"
  119. kubecaml
  120. lablgtk3-extras >= "3.0.1"
  121. lambda-runtime
  122. lambdapi
  123. learn-ocaml
  124. letsencrypt < "2.0.0"
  125. letters
  126. libsail
  127. lichess_api
  128. linol >= "0.2"
  129. linol-eio
  130. linol-lwt
  131. lsp
  132. melange-json = "1.2.0"
  133. melange-json-native
  134. merlin = "4.5-411"
  135. miaou-core
  136. miaou-driver-web
  137. mirage-crypto-ec
  138. monorobot
  139. mopsa
  140. morbig
  141. nats-client
  142. nats-client-async >= "0.0.10"
  143. nloge
  144. nsq
  145. obuilder
  146. ocaml-lsp-server
  147. ocaml-protoc-plugin >= "6.1.0"
  148. ocaml-protoc-yojson
  149. ocaml_db_model
  150. ocaml_pgsql_model
  151. ocf
  152. ocsigen-start
  153. odoc = "2.1.1"
  154. oframl
  155. oidc
  156. ojs-base
  157. ojs_base
  158. ometrics < "0.2.0"
  159. opam-check-npm-deps >= "4.1.0"
  160. openai-gym
  161. openapi < "1.0.0"
  162. openapi_router
  163. openstellina
  164. opium >= "0.19.0"
  165. oraft
  166. orun
  167. osh
  168. oui
  169. ozulip
  170. pa_ppx < "0.19"
  171. pbrt_yojson
  172. pds-reachability
  173. pgn_parser
  174. phylogenetics >= "0.2.0"
  175. pkcs11
  176. pkcs11-driver >= "1.0.0"
  177. playwright
  178. plist
  179. podge
  180. ppx_deriving_jsonschema
  181. ppx_deriving_yojson
  182. ppx_hegel_test
  183. ppx_protocol_conv_json
  184. ppx_yojson
  185. ppx_yojson_conv_lib
  186. prof_spacetime
  187. qmp
  188. quests
  189. r2pipe
  190. radare2
  191. rdf < "1.0.0"
  192. records
  193. repr-bench
  194. rescriptdep
  195. rpclib
  196. rungen
  197. SZXX
  198. safemoney
  199. sail < "0.15"
  200. satyrographos
  201. savvy
  202. semver2
  203. sentry
  204. sihl < "0.2.0" | >= "0.3.0~rc2"
  205. sihl-core
  206. simple_httpd
  207. slack
  208. slacko
  209. slug
  210. smtml >= "0.7.0"
  211. snf_mcp
  212. sosie
  213. soteria
  214. spectrum_palette_ppx
  215. spotify-web-api
  216. sqlgg >= "20260721"
  217. stitch
  218. swagger
  219. tdigest < "2.1.0"
  220. telegraml
  221. textmate-language >= "0.3.0"
  222. textrazor
  223. tidy_email_sendgrid
  224. timedesc < "0.8.0"
  225. timedesc-json
  226. timere < "0.4.0"
  227. user-agent-parser
  228. vecosek
  229. vecosek-scene
  230. vercel
  231. vscoq-language-server < "2.3.3"
  232. vsrocq-language-server
  233. wamp < "1.0"
  234. wamp-yojson
  235. webauthn
  236. why3find
  237. xapi-rrd >= "1.9.0"
  238. yultracer
  239. zarr

Conflicts

None