package yojson

  1. Overview
  2. Docs
Yojson is an optimized parsing and printing library for the JSON format

Install

Dune 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

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

Conflicts

None

OCaml

Innovation. Community. Security.