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. boulangerie
  17. builder-web >= "0.2.0"
  18. cabal
  19. caisar
  20. calculon
  21. camelot >= "1.4.2"
  22. camels
  23. canary
  24. cb-check
  25. cbor
  26. chess_com_api
  27. colibrics
  28. comby
  29. comby-kernel
  30. comby-semantic
  31. commons
  32. containers >= "3.9"
  33. coq-lsp
  34. coq-of-ocaml
  35. coq-serapi < "8.20.0+0.20.0"
  36. current_docker
  37. current_examples
  38. current_git
  39. current_github
  40. current_gitlab
  41. current_slack
  42. current_ssh
  43. current_web
  44. dap
  45. daypack-lib
  46. dblp-api
  47. decoders-yojson
  48. devkit
  49. dnsrobot
  50. docker-api
  51. docker_hub
  52. dot-merlin-reader < "4.9"
  53. dream
  54. dream-inertia
  55. dropbox
  56. dune-release >= "1.4.0"
  57. ecma-regex
  58. elasticsearch-cli = "0.5"
  59. elpi >= "3.3.1"
  60. esgg
  61. fiat-p256
  62. frama-c
  63. fred
  64. frenetic
  65. fstar
  66. gapi-ocaml
  67. gdbprofiler
  68. gendarme-json < "0.4.0"
  69. gendarme-yojson
  70. github
  71. github-data
  72. github-unix < "4.5.1"
  73. gitlab
  74. goblint-cil >= "1.8.0"
  75. gopcaml-mode-merlin < "0.0.6"
  76. graphql
  77. graphql-async >= "0.14.0"
  78. graphql-cohttp >= "0.13.0"
  79. graphql-lwt >= "0.14.0"
  80. graphql_ppx
  81. gremlin
  82. h2
  83. hacl_x25519
  84. hegel
  85. hilite < "0.3.0"
  86. hl_yaml
  87. hockmd
  88. hpack
  89. hsluv
  90. httph
  91. huml
  92. huml-cli
  93. index-bench
  94. ip2location
  95. ip2locationio
  96. irmin-graphql
  97. irmin-tezos
  98. jasmin
  99. jhupllib
  100. jose
  101. js_of_ocaml-compiler < "6.0.1"
  102. json-rpc
  103. json_decoder
  104. jsondiff
  105. jsonkit
  106. jsonrpc < "1.6.0"
  107. jsonschema
  108. jsonschema2atd
  109. jupyter
  110. jupyter-kernel
  111. jwt
  112. jwto
  113. kappa-library < "4.1.3"
  114. karamel
  115. kind2
  116. kremlin < "transition"
  117. kubecaml
  118. lablgtk3-extras >= "3.0.1"
  119. lambda-runtime
  120. lambdapi
  121. learn-ocaml
  122. letsencrypt < "2.0.0"
  123. letters
  124. libsail
  125. lichess_api
  126. linol >= "0.2"
  127. linol-eio
  128. linol-lwt
  129. lsp
  130. melange-json = "1.2.0"
  131. melange-json-native
  132. merlin = "4.5-411"
  133. miaou-core
  134. miaou-driver-web
  135. mirage-crypto-ec
  136. monorobot
  137. mopsa
  138. morbig
  139. nats-client
  140. nats-client-async >= "0.0.10"
  141. nloge
  142. nsq
  143. obuilder
  144. ocaml-lsp-server
  145. ocaml-protoc-plugin >= "6.1.0"
  146. ocaml-protoc-yojson
  147. ocaml_db_model
  148. ocaml_pgsql_model
  149. ocf
  150. ocsigen-start
  151. odoc = "2.1.1"
  152. oframl
  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. pgn_parser
  172. phylogenetics >= "0.2.0"
  173. pkcs11
  174. pkcs11-driver >= "1.0.0"
  175. playwright
  176. plist
  177. podge
  178. ppx_deriving_jsonschema
  179. ppx_deriving_yojson
  180. ppx_hegel_test
  181. ppx_protocol_conv_json
  182. ppx_yojson
  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. soteria
  211. spectrum_palette_ppx
  212. spotify-web-api
  213. sqlgg >= "20260721"
  214. stitch
  215. swagger
  216. tdigest < "2.1.0"
  217. telegraml
  218. textmate-language >= "0.3.0"
  219. textrazor
  220. tidy_email_sendgrid
  221. timedesc < "0.8.0"
  222. timedesc-json
  223. timere < "0.4.0"
  224. user-agent-parser
  225. vecosek
  226. vecosek-scene
  227. vercel
  228. vscoq-language-server < "2.3.3"
  229. vsrocq-language-server
  230. wamp < "1.0"
  231. wamp-yojson
  232. webauthn
  233. why3find
  234. xapi-rrd >= "1.9.0"
  235. yultracer
  236. zarr

Conflicts

None