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.9"
  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. gendarme-json
  55. github < "4.1.0"
  56. goblint-cil >= "1.8.0"
  57. gopcaml-mode-merlin < "0.0.6"
  58. graphql
  59. graphql-async >= "0.14.0"
  60. graphql-cohttp >= "0.13.0"
  61. graphql-lwt >= "0.14.0"
  62. graphql_ppx
  63. h2
  64. hacl_x25519
  65. hilite < "0.3.0"
  66. hl_yaml
  67. hockmd
  68. horned_worm
  69. hpack
  70. hsluv
  71. index-bench
  72. ip2location
  73. ip2locationio
  74. irmin-graphql
  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. jsonschema
  85. jsonschema2atd
  86. jupyter
  87. jupyter-kernel < "0.7"
  88. jwt
  89. jwto
  90. kappa-library < "4.1.3"
  91. karamel
  92. kind2
  93. kremlin < "transition"
  94. kubecaml
  95. lambda-runtime
  96. lambdapi
  97. learn-ocaml
  98. letsencrypt
  99. libsail
  100. linol >= "0.2"
  101. linol-eio
  102. linol-lwt
  103. lsp
  104. melange-json = "1.2.0"
  105. melange-json-native
  106. merlin = "4.5-411"
  107. mirage-crypto-ec
  108. monorobot
  109. mopsa
  110. morbig
  111. nloge
  112. nsq
  113. obuilder
  114. ocaml-lsp-server
  115. ocaml-protoc-plugin >= "6.1.0"
  116. ocaml-protoc-yojson
  117. ocsigen-start
  118. odoc = "2.1.1"
  119. oframl
  120. ogen
  121. oidc
  122. openai-gym
  123. opium >= "0.19.0"
  124. oraft
  125. orun
  126. ozulip
  127. pbrt_yojson
  128. pds-reachability < "0.2.3"
  129. petr4
  130. phylogenetics >= "0.2.0"
  131. pkcs11 < "1.0.0"
  132. pkcs11-driver >= "1.0.0"
  133. plist
  134. podge
  135. ppx_deriving_jsonschema
  136. ppx_deriving_yojson
  137. ppx_protocol_conv_json
  138. ppx_yojson
  139. prof_spacetime
  140. qmp
  141. quests
  142. r2pipe
  143. radare2
  144. rdf < "0.12.0"
  145. records
  146. repr-bench
  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
  159. snf_mcp
  160. spotify-web-api
  161. stitch
  162. swagger
  163. tdigest < "2.1.0"
  164. telegraml
  165. textrazor
  166. tezos-context-hash-irmin
  167. timedesc < "0.8.0"
  168. timedesc-json
  169. timere < "0.4.0"
  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.