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

Conflicts

None