package yojson

Build not checked
  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"

Optional Dependencies

None

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

Conflicts

None

Build status

Results of building yojson with each compiler on check.ci.ocaml.org, run of against opam-repository 8d8d144. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

This version is not in the latest run; the versions below are.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
3.0.0 good good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure