diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index bb34d86..95e9ba4 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -10,6 +10,8 @@ New features: Bugfixes: +* Changed type in docs of `decodeJson` from `forall a. DecodeJson a => Json -> Either String a` to `forall a. DecodeJson a => Json -> Either JsonDecodeError a`. + Other improvements: ## [0.0.0] - 2020-01-01 diff --git a/docs/README.md b/docs/README.md index eebdd73..5881066 100644 --- a/docs/README.md +++ b/docs/README.md @@ -75,7 +75,7 @@ We can automatically decode `Json` using the `DecodeJson` type class ([pursuit]( Every type within `User` has an instance for `DecodeJson`, which means we can use the `decodeJson` function to try to decode a `Json` value into our type. Once again, integer and string values will be decoded directly from the `Json`, but containing types like `Record` and `Maybe` will also require instances for the types they contain. ```purs -decodeJson :: DecodeJson a => Json -> Either String a +decodeJson :: DecodeJson a => Json -> Either JsonDecodeError a ``` > Tip: To parse a JSON string as a `Json` value, you can use the `parseJson` function (which can fail). If you are sure you have valid JSON, then consider writing it in an FFI file and foreign importing it as `Json` as described in the [`argonaut-core` documentation](https://github.com/purescript-contrib/purescript-argonaut-core#introducing-json-values).