[ANN] Yojson 1.6.0



I’m happy to announce the release of Yojson version 1.6.0.

In an effort to modernize it a little, each submodule now comes with a type t and equal, pp and show functions.

The json aliases for t are being deprecated, they’ll be removed for the next major release.

Special thanks to @Leonidas since he basically did all the work!

You can find Yojson on github here.


I thought to_string is the OCaml way of stringifying a value, isn’t it?


I interpret to_string as converting a value to a string in a format where hopefully one can also do of_string to convert it back. Useful for (de)serialisation.

I use function show mostly for debugging or end-user display. The generated string need not be convertible back into the original type.


Yes that’s it, show and pp prints the JSON AST as represented in OCaml, they’re mostly useful for debugging and testing.

The to_string function already exists and convert the AST to a JSON string, which you can parse using from_string.