Releases: purescript-contrib/purescript-argonaut-codecs
v9.1.0
- Add fromJsonString and toJsonString by @sigma-andex in #109
v9.0.0
Breaking changes:
- Update project and deps to PureScript v0.15.0 (#106 by @JordanMartinez)
Other improvements:
- Added
purs-tidy
formatter (#104 by @thomashoneyman)
v8.1.0
New features:
- Added support for decoding missing record fields to
Nothing
(#93 by @jvliwanag)
v8.0.0
Breaking changes:
New features:
- Added decoders for
NonEmptyString
and added a newdecodeNonempty
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 ofJsonDecodeError
(#88) - Added minor clarifications to multi-arg example (#84)
- Changed default branch to
main
frommaster
- 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
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 errorparseJson :: String -> Either JsonDecodeError Json
can be used instead ofData.Argonaut.Parser.jsonParser
if you need to parse aJson
value from a JSON string. It usesjsonParser
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
v6.0.2
v6.0.1
Fixes a typo in documentation (@JamieBallingall)