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.6.0.tbz
sha256=5616cc6dd4c54bfb5d8cedc9271e01b0f2e3423e5c0ea5a91bf00033bf1f9d13
md5=8ca16557d3068253cc375452af3bde96

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: 31 Jan 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.18"
  2. acgtk
  3. anthropic
  4. archetype
  5. atd >= "2.6.0"
  6. atdgen < "2.2.1"
  7. atdgen-runtime < "2.2.1"
  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. calculon < "0.7"
  17. calculon-redis-lib
  18. camels
  19. canary
  20. cb-check
  21. cbor
  22. cconv-ppx
  23. colibrics
  24. comby
  25. comby-kernel
  26. comby-semantic
  27. containers >= "3.9"
  28. coq-of-ocaml
  29. current_docker
  30. current_git
  31. current_github
  32. current_gitlab
  33. current_slack
  34. current_ssh
  35. dap
  36. daypack-lib
  37. dblp-api
  38. decoders-yojson
  39. devkit
  40. docker-api
  41. docker_hub
  42. dot-merlin-reader < "4.9"
  43. dream
  44. dream-inertia
  45. dropbox
  46. dune-release >= "1.4.0"
  47. elasticsearch-cli = "0.5"
  48. elpi >= "3.3.1"
  49. fiat-p256
  50. frama-c
  51. fred
  52. fstar
  53. gapi-ocaml
  54. gdbprofiler
  55. gemini < "0.3.0"
  56. gendarme-json < "0.4.0"
  57. gendarme-yojson
  58. github < "4.1.0"
  59. github-unix < "4.5.1"
  60. goblint-cil >= "1.8.0"
  61. gopcaml-mode-merlin < "0.0.6"
  62. graphql
  63. graphql-async >= "0.14.0"
  64. graphql-cohttp >= "0.13.0"
  65. graphql-lwt >= "0.14.0"
  66. graphql_ppx
  67. h2
  68. hacl_x25519
  69. hilite < "0.3.0"
  70. hl_yaml
  71. hockmd
  72. horned_worm
  73. hpack
  74. hsluv
  75. huml
  76. huml-cli
  77. index-bench
  78. ip2location
  79. ip2locationio
  80. irmin-graphql
  81. irmin-tezos
  82. jasmin
  83. jhupllib < "0.2.2"
  84. jose
  85. js_of_ocaml-compiler < "6.0.1"
  86. json-rpc
  87. json_decoder
  88. jsondiff
  89. jsonrpc < "1.6.0"
  90. jsonschema
  91. jsonschema2atd
  92. jupyter
  93. jupyter-kernel < "0.7"
  94. jwt
  95. jwto
  96. kappa-library < "4.1.3"
  97. karamel
  98. kind2
  99. kremlin < "transition"
  100. kubecaml
  101. lambda-runtime
  102. lambdapi
  103. learn-ocaml
  104. letsencrypt < "2.0.0"
  105. libsail
  106. linol >= "0.2"
  107. linol-eio
  108. linol-lwt
  109. lsp
  110. melange-json = "1.2.0"
  111. melange-json-native
  112. merlin = "4.5-411"
  113. mirage-crypto-ec
  114. monorobot
  115. mopsa
  116. morbig
  117. nats-client
  118. nloge
  119. nsq
  120. obuilder
  121. ocaml-lsp-server
  122. ocaml-protoc-plugin >= "6.1.0"
  123. ocaml-protoc-yojson
  124. ocsigen-start
  125. odoc = "2.1.1"
  126. oframl
  127. ogen
  128. oidc
  129. opam-check-npm-deps >= "4.1.0"
  130. openai-gym
  131. opium >= "0.19.0"
  132. oraft
  133. orun
  134. oui
  135. ozulip
  136. pbrt_yojson
  137. pds-reachability < "0.2.3"
  138. petr4
  139. phylogenetics >= "0.2.0"
  140. pkcs11
  141. pkcs11-driver >= "1.0.0"
  142. plist
  143. podge
  144. ppx_deriving_jsonschema
  145. ppx_deriving_yojson
  146. ppx_protocol_conv_json
  147. ppx_yojson
  148. prof_spacetime
  149. qmp
  150. quests
  151. r2pipe
  152. radare2
  153. rdf < "0.12.0"
  154. records
  155. repr-bench
  156. rungen
  157. SZXX
  158. safemoney
  159. sail < "0.15"
  160. satyrographos
  161. savvy
  162. semver2
  163. sentry
  164. simple_httpd
  165. slack
  166. slacko
  167. slug
  168. smtml >= "0.7.0"
  169. snf_mcp
  170. spotify-web-api
  171. stitch
  172. swagger
  173. tdigest < "2.1.0"
  174. telegraml
  175. textrazor
  176. timedesc < "0.8.0"
  177. timedesc-json
  178. timere < "0.4.0"
  179. user-agent-parser
  180. vecosek
  181. vecosek-scene
  182. vercel
  183. vscoq-language-server < "2.3.3"
  184. vsrocq-language-server
  185. wamp < "1.0"
  186. wamp-yojson
  187. webauthn
  188. xapi-rrd >= "1.9.0"
  189. yultracer
  190. zarr

Conflicts

None