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

v1.4.1.tar.gz
sha256=c081a8cb5a03bddbcac4614f468cf5edafe11805277572af4071e362be6611fb
md5=3ea6e36422dd670e8ab880710d5f7398

Description

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: JSON library for OCaml

Library documentation

Currently at https://mjambon.github.io/mjambon2016/yojson-doc/Yojson.html

The link above is for the ocamldoc-generated of some past version of yojson. Suggestions on how to keep this documentation updated automatically for each minor release are welcome.

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. jbuilder >= "1.0+beta7"
  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. frama-c < "23.0"
  44. fred
  45. fstar
  46. github < "4.1.0"
  47. github-unix < "4.5.1"
  48. gmocoin
  49. goblint-cil >= "1.8.0"
  50. graphql < "0.14.0"
  51. graphql_ppx < "1.2.2"
  52. h2
  53. hilite < "0.3.0"
  54. hl_yaml
  55. hockmd
  56. hpack
  57. hsluv
  58. huml
  59. huml-cli
  60. index-bench
  61. irmin-graphql
  62. irmin-tezos
  63. js_of_ocaml-compiler < "5.9.0"
  64. json-rpc
  65. json_decoder
  66. jsondiff
  67. jsonrpc < "1.6.0"
  68. jsonschema
  69. jsonschema2atd
  70. jupyter-kernel < "0.5"
  71. jwt
  72. jwto < "0.2.0"
  73. karamel
  74. kind2
  75. kremlin < "transition"
  76. kubecaml
  77. learn-ocaml
  78. lsp
  79. miaou-core
  80. miaou-driver-web
  81. monorobot
  82. morbig < "0.10.4"
  83. nats-client
  84. nsq
  85. obuilder < "0.4"
  86. ocaml-lsp-server
  87. ocaml-protoc-plugin >= "6.1.0"
  88. ocaml-protoc-yojson
  89. odoc = "2.1.1"
  90. oframl
  91. oidc
  92. opam-check-npm-deps >= "4.1.0"
  93. openai-gym
  94. oraft
  95. orun
  96. oui
  97. ozulip
  98. pds-reachability < "0.2.3"
  99. phylogenetics = "0.2.0"
  100. pkcs11
  101. plist
  102. podge
  103. ppx_deriving_jsonschema
  104. prof_spacetime
  105. qmp < "0.19.0"
  106. quests
  107. r2pipe
  108. radare2
  109. records < "1.0.0"
  110. repr-bench
  111. rescriptdep
  112. rungen
  113. SZXX
  114. safemoney
  115. satyrographos
  116. savvy
  117. semver2
  118. sentry
  119. simple_httpd
  120. slack
  121. slacko
  122. slug
  123. soteria
  124. spotify-web-api
  125. stitch
  126. swagger
  127. tdigest < "2.1.0"
  128. telegraml
  129. textrazor < "0.1.1"
  130. vecosek
  131. vecosek-scene
  132. vercel
  133. vscoq-language-server < "2.3.3"
  134. vsrocq-language-server
  135. wamp < "1.0"
  136. wamp-yojson
  137. webauthn
  138. xapi-rrd >= "1.9.0"
  139. yultracer

Conflicts (1)

  1. dune >= "1.7.0"