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.

Added to opam-repository:

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. atproto
  7. aws-s3 < "4.5.1" | >= "4.8.0"
  8. awskit-lwt-unix
  9. awskit-s3
  10. bap-radare2
  11. bitcoin < "3.0"
  12. bitflyer
  13. boulangerie
  14. boulodrome
  15. builder-web >= "0.2.0"
  16. cabal
  17. camels
  18. canary
  19. cb-check
  20. cbor < "0.3"
  21. colibrics
  22. comby
  23. comby-kernel
  24. comby-semantic
  25. containers >= "3.9"
  26. current_docker
  27. current_git
  28. current_github
  29. current_gitlab
  30. current_slack
  31. current_ssh
  32. dap
  33. daypack-lib
  34. dblp-api
  35. decoders-yojson < "0.7.0"
  36. devkit < "1.2"
  37. disml
  38. docker-api < "0.2.2"
  39. dream
  40. dream-inertia
  41. ecma-regex
  42. elpi >= "3.3.1"
  43. elpi-lsp
  44. frama-c < "23.0"
  45. fred
  46. fstar
  47. github < "4.1.0"
  48. github-unix < "4.5.1"
  49. gmocoin
  50. goblint-cil >= "1.8.0"
  51. graphql < "0.14.0"
  52. graphql_ppx < "1.2.2"
  53. h2
  54. hilite < "0.3.0"
  55. hl_yaml
  56. hockmd
  57. hpack
  58. hsluv
  59. huml
  60. huml-cli
  61. index-bench
  62. irmin-graphql
  63. irmin-tezos
  64. js_of_ocaml-compiler < "5.9.0"
  65. json-rpc
  66. json_decoder
  67. jsondiff
  68. jsonrpc < "1.6.0"
  69. jsonschema
  70. jsonschema2atd
  71. jupyter-kernel < "0.5"
  72. jwt
  73. jwto < "0.2.0"
  74. karamel
  75. kind2
  76. kremlin < "transition"
  77. kubecaml
  78. learn-ocaml
  79. lsp
  80. miaou-core
  81. miaou-driver-web
  82. monorobot
  83. morbig < "0.10.4"
  84. nats-client
  85. nsq
  86. obuilder < "0.4"
  87. ocaml-lsp-server
  88. ocaml-protoc-plugin >= "6.1.0"
  89. ocaml-protoc-yojson
  90. odoc = "2.1.1"
  91. oframl
  92. oidc
  93. opam-check-npm-deps >= "4.1.0"
  94. openai-gym
  95. oraft
  96. orun
  97. oui
  98. ozulip
  99. pds-reachability < "0.2.3"
  100. phylogenetics = "0.2.0"
  101. pkcs11
  102. plist
  103. podge
  104. ppx_deriving_jsonschema
  105. ppx_protocol_conv_json < "5.2.1"
  106. prof_spacetime
  107. qmp < "0.19.0"
  108. quests
  109. r2pipe
  110. radare2
  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. soteria
  126. spotify-web-api
  127. stitch
  128. swagger
  129. tdigest < "2.1.0"
  130. telegraml
  131. textrazor < "0.1.1"
  132. vecosek
  133. vecosek-scene
  134. vercel
  135. vscoq-language-server < "2.3.3"
  136. vsrocq-language-server
  137. wamp < "1.0"
  138. wamp-yojson
  139. webauthn
  140. xapi-rrd >= "1.9.0"
  141. yultracer

Conflicts

None