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.

Published: 15 Feb 2019

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

Conflicts

None