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. aws-s3 < "4.5.1" | >= "4.8.0"
  7. awskit-lwt-unix
  8. awskit-s3
  9. bap-radare2
  10. bitcoin < "3.0"
  11. bitflyer
  12. boulangerie
  13. builder-web >= "0.2.0"
  14. cabal
  15. camels
  16. canary
  17. cb-check
  18. cbor < "0.3"
  19. colibrics
  20. comby
  21. comby-kernel
  22. comby-semantic
  23. containers >= "3.9"
  24. current_docker
  25. current_git
  26. current_github
  27. current_gitlab
  28. current_slack
  29. current_ssh
  30. dap
  31. daypack-lib
  32. dblp-api
  33. decoders-yojson < "0.7.0"
  34. devkit < "1.2"
  35. disml
  36. docker-api < "0.2.2"
  37. dream
  38. dream-inertia
  39. ecma-regex
  40. elpi >= "3.3.1"
  41. frama-c < "23.0"
  42. fred
  43. fstar
  44. github < "4.1.0"
  45. github-unix < "4.5.1"
  46. gmocoin
  47. goblint-cil >= "1.8.0"
  48. graphql < "0.14.0"
  49. graphql_ppx < "1.2.2"
  50. h2
  51. hilite < "0.3.0"
  52. hl_yaml
  53. hockmd
  54. hpack
  55. hsluv
  56. huml
  57. huml-cli
  58. index-bench
  59. irmin-graphql
  60. irmin-tezos
  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-kernel < "0.5"
  69. jwt
  70. jwto < "0.2.0"
  71. karamel
  72. kind2
  73. kremlin < "transition"
  74. kubecaml
  75. learn-ocaml
  76. lsp
  77. miaou-core
  78. miaou-driver-web
  79. monorobot
  80. morbig < "0.10.4"
  81. nats-client
  82. nsq
  83. obuilder < "0.4"
  84. ocaml-lsp-server
  85. ocaml-protoc-plugin >= "6.1.0"
  86. ocaml-protoc-yojson
  87. odoc = "2.1.1"
  88. oframl
  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. phylogenetics = "0.2.0"
  98. pkcs11
  99. plist
  100. podge
  101. ppx_deriving_jsonschema
  102. prof_spacetime
  103. qmp < "0.19.0"
  104. quests
  105. r2pipe
  106. radare2
  107. records < "1.0.0"
  108. repr-bench
  109. rescriptdep
  110. rungen
  111. SZXX
  112. safemoney
  113. satyrographos
  114. savvy
  115. semver2
  116. sentry
  117. simple_httpd
  118. slack
  119. slacko
  120. slug
  121. soteria
  122. spotify-web-api
  123. stitch
  124. swagger
  125. tdigest < "2.1.0"
  126. telegraml
  127. textrazor < "0.1.1"
  128. vecosek
  129. vecosek-scene
  130. vercel
  131. vscoq-language-server < "2.3.3"
  132. vsrocq-language-server
  133. wamp < "1.0"
  134. wamp-yojson
  135. webauthn
  136. xapi-rrd >= "1.9.0"
  137. yultracer

Conflicts (1)

  1. dune >= "1.7.0"