Hello! I am announcing the first release of jsonoo, a JSON library for Js_of_ocaml.
This library provides a very similar API to the excellent BuckleScript library, bs-json by glennsl. Unlike bs-json, this port of the library tries to follow OCaml naming conventions and be easier to interface with other OCaml types like Hashtbl.t . This library passes a nearly equivalent test suite.
The main goal of this first release was to provide a similar-enough API to bs-json to simplify the porting process for vscode-ocaml-platform with minimal code changes. I’m not that familiar with Yojson, which would make it difficult to port the ways vscode-ocaml-platform uses JSON.
Yojson does seem to be quite popular, so I will investigate adding interoperability for a later release. If you are starting a Js_of_ocaml project from scratch it might be preferable to start with Yojson from the beginning.
Yojson won’t be very helpful here as jsoo already provides json encoding/decoding via the browser API.
However, it’s still not ideal to tie an encoding/decoding API to the underlying json implementation. It would be nice if encoders/decoders were more usable.