package yojson

  1. Overview
  2. Docs
Yojson is an optimized parsing and printing library for the JSON format

Install

Dune Dependency

Authors

Maintainers

Sources

v1.4.0.tar.gz
sha256=7d06340b769ed6ff5b2171a0e820d1e8f4337aef3929090fc976efe845639146
md5=729b5e15b2f7c1cb7d402bc301d06d0e

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: 19 Jul 2017

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. archetype < "1.2.5"
  3. atdgen < "2.2.1"
  4. atdgen-runtime < "2.2.1"
  5. aws-s3 < "4.5.1" | >= "4.8.0"
  6. bap-radare2
  7. bitcoin < "3.0"
  8. boulangerie
  9. builder-web >= "0.2.0"
  10. calculon-redis-lib
  11. camels
  12. canary
  13. cb-check
  14. cbor < "0.3"
  15. cconv-ppx
  16. colibrics
  17. comby
  18. comby-kernel
  19. comby-semantic
  20. containers >= "3.9"
  21. current_docker
  22. current_git
  23. current_github
  24. current_gitlab
  25. current_slack
  26. current_ssh
  27. dap
  28. daypack-lib
  29. dblp-api
  30. decoders-yojson < "0.7.0"
  31. devkit < "1.2"
  32. disml
  33. docker-api < "0.2.2"
  34. dream
  35. dream-inertia
  36. frama-c < "23.0"
  37. fred
  38. fstar
  39. gdbprofiler < "0.4"
  40. gemini < "0.3.0"
  41. github < "4.1.0"
  42. goblint-cil >= "1.8.0"
  43. graphql < "0.14.0"
  44. graphql_ppx < "1.2.2"
  45. h2
  46. hilite < "0.3.0"
  47. hl_yaml
  48. hockmd
  49. hpack
  50. hsluv
  51. index-bench
  52. irmin-graphql
  53. irmin-tezos
  54. jhupllib < "0.2.2"
  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 < "2.7.0"
  63. jupyter-kernel < "0.5"
  64. jwt
  65. jwto < "0.2.0"
  66. karamel
  67. kind2
  68. kremlin < "transition"
  69. learn-ocaml
  70. lsp
  71. monorobot
  72. morbig < "0.10.4"
  73. nsq
  74. obuilder < "0.4"
  75. ocaml-lsp-server
  76. ocaml-protoc-plugin >= "6.1.0"
  77. ocaml-protoc-yojson
  78. odoc = "2.1.1"
  79. oframl
  80. ogen
  81. oidc
  82. openai-gym
  83. oraft
  84. orun
  85. ozulip
  86. pds-reachability < "0.2.3"
  87. petr4
  88. phylogenetics = "0.2.0"
  89. pkcs11 < "1.0.0"
  90. plist
  91. podge
  92. ppx_deriving_jsonschema
  93. ppx_yojson < "1.0.0"
  94. prof_spacetime
  95. qmp < "0.19.0"
  96. quests
  97. r2pipe
  98. radare2
  99. rdf < "0.12.0"
  100. records < "1.0.0"
  101. repr-bench
  102. rungen
  103. SZXX
  104. safemoney
  105. satyrographos
  106. savvy
  107. sentry
  108. slack
  109. slacko
  110. slug
  111. spotify-web-api
  112. stitch
  113. tdigest < "2.1.0"
  114. telegraml
  115. textrazor < "0.1.1"
  116. tezos-context-hash-irmin
  117. vecosek
  118. vecosek-scene
  119. vercel
  120. vscoq-language-server
  121. wamp < "1.0"
  122. wamp-yojson
  123. webauthn
  124. xapi-rrd >= "1.9.0"

Conflicts (1)

  1. dune >= "1.7.0"
OCaml

Innovation. Community. Security.