Skip to content

Releases: purescript-contrib/purescript-argonaut-codecs

v9.1.0

23 Jun 15:09
f8fdc1e
Compare
Choose a tag to compare

v9.0.0

27 Apr 23:00
176a5dd
Compare
Choose a tag to compare

Breaking changes:

Other improvements:

v8.1.0

09 Apr 18:08
b0a041d
Compare
Choose a tag to compare

New features:

  • Added support for decoding missing record fields to Nothing (#93 by @jvliwanag)

v8.0.0

26 Feb 22:06
5878f04
Compare
Choose a tag to compare

Breaking changes:

  • Added support for PureScript 0.14 and dropped support for all previous versions (#90, #96)

New features:

  • Added decoders for NonEmptyString and added a new decodeNonempty function (#94)
  • Added encoder for NonEmptyString (d0liver, #98)

Bugfixes:

Other improvements:

  • Fixed a typo in the documentation in which String was still used as the error type instead of JsonDecodeError (#88)
  • Added minor clarifications to multi-arg example (#84)
  • Changed default branch to main from master
  • Updated to comply with Contributors library guidelines by adding new issue and pull request templates, updating documentation, and migrating to Spago for local development and CI (#86, #89)

v7.0.0

19 Jun 06:50
9b00fcc
Compare
Choose a tag to compare

This release introduces a few major changes:

Introducing typed errors

This release introduces a shift in the way this library handles errors. Previously, errors were reported as String values when decoding. Now, errors are reported as JsonDecodeError values, which provide much richer information about what errors have occurred. This brings this library into line with purescript-codec-argonaut, which also uses typed errors.

There are new functions to help work with this error type:

  • printJsonDecodeError :: JsonDecodeError -> String can be used to recover a string error from a typed error
  • parseJson :: String -> Either JsonDecodeError Json can be used instead of Data.Argonaut.Parser.jsonParser if you need to parse a Json value from a JSON string. It uses jsonParser under the hood, but provides a typed error instead of a string error.

Implemented in #73 and relevant documentation updated in #80.

Add encoding and decoding functions without type classes

Sometimes it is useful to be able to use the encoders and decoders defined in this library without needing the type classes. If you want to use the functions directly without a type class, they can now be found in the Data.Argonaut.Decode.Decoders and Data.Argonaut.Encode.Encoders modules.

Implemented in #74.

Removed deprecated functions and operators

A number of functions and operators were deprecated in the last release. Their removal doesn't change the functionality of this library -- as noted in the prior release, all deprecated operators have functionally-equivalent alternatives. For example:

  • .? -> .:
  • .?? -> .:?
  • .?! -> .:!

Implemented in #82.

Migrate the library to use Spago

This is a purely internal change, but the purescript-argonaut-codecs library now uses Spago internally to manage dependencies and the overall build. Over time the purescript-contrib organization will shift to use Spago instead of Pulp + Bower.

Implemented in #81.

v6.1.0

08 May 17:00
1e528c9
Compare
Choose a tag to compare

This release includes two small improvements to the library:

  • Adds new instances for NonEmptyArray and NonEmptyList (#61) and Identity (#54)
  • Elaborates errors produced with the generic instance for records (#72)

As well as a new tutorial for the library (#62)

v6.0.2

06 May 19:35
b0317d5
Compare
Choose a tag to compare

Fixed associativity of a type annotation in advance of new purs version

v6.0.1

24 Mar 16:38
c6f029e
Compare
Choose a tag to compare

Fixes a typo in documentation (@JamieBallingall)

v6.0.0

05 Mar 19:33
ac5e4fb
Compare
Choose a tag to compare

Updated dependencies

v5.1.3

01 Mar 17:07
3be823e
Compare
Choose a tag to compare

Uses the elaborateFailure function in getFieldOptional' for more descriptive error messages (@LucianU)