Skip to content

v1.2.0

Compare
Choose a tag to compare
@mlms13 mlms13 released this 15 Oct 17:28

This release fixes a couple very minor bugs and adds a handful of new helper functions to ease the transition away from deprecated features, in preparation for the eventual 2.0 release.

I fully expect this to be the final release in the 1.x cycle (but I'll continue making releases if additional issues are found).

✨ New features

  • arrayAt allows decoding specific positions within an array. This will eventually replace the provided tuple decoders (which are now deprecated)
  • null is a decoder that expects exactly the JSON null value. Internally, this allows us to simplify optional decoders
  • arrayJson, listJson, and dictJson each allow decoding the outer structure while preserving the inner JSON. This is another change that will eventually help simplify some of the code for the more complex decoders

🐛 Bug fixes

  • the intFromNumber decoder will now fail on very large JSON numbers that would overflow the bounds of a valid OCaml integer (#137)
  • optionalField decoders will produce a more correct error if the outer structure is not a JSON object (#135)