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.

Published: 24 Feb 2018

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

Conflicts (1)

  1. dune >= "1.7.0"