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

Conflicts (1)

  1. dune >= "1.7.0"