package yojson

Build not checked
  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

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

Conflicts (1)

  1. dune >= "1.7.0"

Build status

Results of building yojson with each compiler on check.ci.ocaml.org, run of against opam-repository 78c202b. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

This version is not in the latest run; the versions below are.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
3.0.0 good good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure