Hello fellow Camel-wranglers,
This Friday, it is my pleasure to announce the release of Yojson 2.0.0. You can get it in your local OPAM repository.
Key highlights include:
- Fewer dependencies: Given Yojson is a common dependency we cut down on its dependencies so you have to install less and have less transitive dependencies
Seqinterface: Since OCaml 4.14 deprecatesStreamand 5.0 removes it, this was a good time to change to this interfaceBufferinterface: coming along with #1, we changed Yojson to useBufferwherever it was usingBinioutypes before
Thanks to everybody involved in this release!
If Yojson sounds like an interesting project for you to contribute, join us.
Full changelog follows:
2.0.0
2022-06-02
Removed
- Removed dependency on easy-format and removed
pretty_formatfrom
Yojson,Yojson.Basic,Yojson.SafeandYojson.Raw. (@c-cube, #90) - Removed dependency on
biniou, simplifying the chain of dependencies. This
changes some APIs: - Removed
yojson-binioulibrary - Removed deprecated
jsontype aliasing typetwhich has been available
since 1.6.0 (@Leonidas, #100). - Removed
json_maxtype (@Leonidas, #103) - Removed constraint that the “root” value being rendered (via either
pretty_printorto_string) must be an object or array. (@cemerick, #121) - Removed
validate_jsonas it only made sense if the type was calledjson.
(@Leonidas, #137)
Add
- Add an opam package
yojson-benchto deal with benchmarks dependency
(@tmcgilchrist, #117) - Add a benchmark to judge the respective performance of providing a buffer vs
letting Yojson create an internal (#134, @Leonidas) - Add an optional
sufkeyword argument was added to functions that write
serialized JSON, thus allowing NDJSON output. Most functions default to not
adding any suffix except forto_file(#124, @panglesd) and functions
writing sequences of values where the default is\n(#135,
@Leonidas)
Change
- The
stream_from_*andstream_to_*functions now use aSeq.tinstead of a
Stream.t, and they are renamed intoseq_from_*andseq_to_*(@gasche, #131).