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. mirage-crypto-ec
  128. monorobot
  129. mopsa
  130. morbig
  131. nats-client
  132. nats-client-async >= "0.0.10"
  133. nloge
  134. nsq
  135. obuilder
  136. ocaml-lsp-server
  137. ocaml-protoc-plugin >= "6.1.0"
  138. ocaml-protoc-yojson
  139. ocaml_db_model
  140. ocaml_pgsql_model
  141. ocf
  142. ocsigen-start
  143. odoc = "2.1.1"
  144. oframl
  145. oidc
  146. ojs-base
  147. ojs_base
  148. ometrics < "0.2.0"
  149. opam-check-npm-deps >= "4.1.0"
  150. openai-gym
  151. openapi < "1.0.0"
  152. openapi_router
  153. openstellina
  154. opium >= "0.19.0"
  155. oraft
  156. orun
  157. osh
  158. oui
  159. ozulip
  160. pa_ppx < "0.19"
  161. pbrt_yojson
  162. pds-reachability
  163. pgn_parser
  164. phylogenetics >= "0.2.0"
  165. pkcs11
  166. pkcs11-driver >= "1.0.0"
  167. plist
  168. podge
  169. ppx_deriving_jsonschema
  170. ppx_deriving_yojson
  171. ppx_protocol_conv_json
  172. ppx_yojson
  173. ppx_yojson_conv_lib
  174. prof_spacetime
  175. qmp
  176. quests
  177. r2pipe
  178. radare2
  179. rdf < "1.0.0"
  180. records
  181. repr-bench
  182. rescriptdep
  183. rpclib
  184. rungen
  185. SZXX
  186. safemoney
  187. sail < "0.15"
  188. satyrographos
  189. savvy
  190. semver2
  191. sentry
  192. sihl < "0.2.0" | >= "0.3.0~rc2"
  193. sihl-core
  194. simple_httpd
  195. slack
  196. slacko
  197. slug
  198. smtml >= "0.7.0"
  199. snf_mcp
  200. spectrum_palette_ppx
  201. spotify-web-api
  202. stitch
  203. swagger
  204. tdigest < "2.1.0"
  205. telegraml
  206. textmate-language >= "0.3.0"
  207. textrazor
  208. tidy_email_sendgrid
  209. timedesc < "0.8.0"
  210. timedesc-json
  211. timere < "0.4.0"
  212. user-agent-parser
  213. vecosek
  214. vecosek-scene
  215. vercel
  216. vscoq-language-server < "2.3.3"
  217. vsrocq-language-server
  218. wamp < "1.0"
  219. wamp-yojson
  220. webauthn
  221. why3find
  222. xapi-rrd >= "1.9.0"
  223. yultracer
  224. zarr

Conflicts

None