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

Conflicts

None