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

Conflicts

None

OCaml

Innovation. Community. Security.