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

Conflicts

None

Build status

Results of building yojson with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. 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