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.5.0.tbz
sha256=70a0f972fedebd736546eae832e255753d3214a8b3283597ae112577d70c8b33
md5=d80de1bacdde292af42f7c78b323da7b

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: 27 Dec 2018

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

None

  1. 0install < "2.18"
  2. anthropic
  3. archetype < "1.2.5"
  4. atdgen < "2.2.1"
  5. atdgen-runtime < "2.2.1"
  6. aws-s3 < "4.5.1" | >= "4.8.0"
  7. bap-radare2
  8. bitcoin < "3.0"
  9. boulangerie
  10. builder-web >= "0.2.0"
  11. calculon < "0.6"
  12. calculon-redis-lib
  13. camels
  14. canary
  15. cb-check
  16. cbor < "0.3"
  17. cconv-ppx
  18. colibrics
  19. comby
  20. comby-kernel
  21. comby-semantic
  22. containers >= "3.9"
  23. current_docker
  24. current_git
  25. current_github
  26. current_gitlab
  27. current_slack
  28. current_ssh
  29. dap
  30. daypack-lib
  31. dblp-api
  32. decoders-yojson < "0.7.0"
  33. devkit < "1.2"
  34. disml
  35. docker-api < "0.2.2"
  36. dream
  37. dream-inertia
  38. elpi >= "3.3.1"
  39. frama-c < "23.0"
  40. fred
  41. fstar
  42. gdbprofiler < "0.4"
  43. gemini < "0.3.0"
  44. github < "4.1.0"
  45. github-unix < "4.5.1"
  46. goblint-cil >= "1.8.0"
  47. graphql < "0.14.0"
  48. graphql_ppx < "1.2.2"
  49. h2
  50. hilite < "0.3.0"
  51. hl_yaml
  52. hockmd
  53. hpack
  54. hsluv
  55. huml
  56. huml-cli
  57. index-bench
  58. irmin-graphql
  59. irmin-tezos
  60. jhupllib < "0.2.2"
  61. js_of_ocaml-compiler < "5.9.0"
  62. json-rpc
  63. json_decoder
  64. jsondiff
  65. jsonrpc < "1.6.0"
  66. jsonschema
  67. jsonschema2atd
  68. jupyter < "2.7.0"
  69. jupyter-kernel < "0.5"
  70. jwt
  71. jwto < "0.2.0"
  72. karamel
  73. kind2
  74. kremlin < "transition"
  75. kubecaml
  76. learn-ocaml
  77. lsp
  78. monorobot
  79. morbig < "0.10.4"
  80. nats-client
  81. nsq
  82. obuilder < "0.4"
  83. ocaml-lsp-server
  84. ocaml-protoc-plugin >= "6.1.0"
  85. ocaml-protoc-yojson
  86. odoc = "2.1.1"
  87. oframl
  88. ogen
  89. oidc
  90. opam-check-npm-deps >= "4.1.0"
  91. openai-gym
  92. oraft
  93. orun
  94. oui
  95. ozulip
  96. pds-reachability < "0.2.3"
  97. petr4
  98. phylogenetics = "0.2.0"
  99. pkcs11
  100. plist
  101. podge
  102. ppx_deriving_jsonschema
  103. ppx_protocol_conv_json >= "5.0.0" & < "5.2.1"
  104. ppx_yojson < "1.0.0"
  105. prof_spacetime
  106. qmp < "0.19.0"
  107. quests
  108. r2pipe
  109. radare2
  110. rdf < "0.12.0"
  111. records < "1.0.0"
  112. repr-bench
  113. rescriptdep
  114. rungen
  115. SZXX
  116. safemoney
  117. satyrographos
  118. savvy
  119. semver2
  120. sentry
  121. simple_httpd
  122. slack
  123. slacko
  124. slug
  125. spotify-web-api
  126. stitch
  127. swagger
  128. tdigest < "2.1.0"
  129. telegraml
  130. textrazor < "0.1.1"
  131. vecosek
  132. vecosek-scene
  133. vercel
  134. vscoq-language-server < "2.3.3"
  135. vsrocq-language-server
  136. wamp < "1.0"
  137. wamp-yojson
  138. webauthn
  139. xapi-rrd >= "1.9.0"
  140. yultracer

Conflicts

None