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

Conflicts

None