Skip to content

Commit f315154

Browse files
Fix type signature of jsonParser in quick start
1 parent da5148e commit f315154

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ someObject =
6565
)
6666
```
6767

68-
Finally, you can parse JSON from a string using the `jsonParser` function. However, this isn't guaranteed to produce a correct value, so it returns a `Maybe` value.
68+
Finally, you can parse JSON from a string using the `jsonParser` function. However, this isn't guaranteed to produce a correct value, so it returns an `Either` value, where a parsing error is represented with `Left` containing an error message.
6969

7070
```purs
7171
import Data.Argonaut.Core (jsonParser)
7272
import Data.Maybe (Maybe(..))
7373
74-
someObject :: Maybe Json
74+
someObject :: Either String Json
7575
someObject = jsonParser
7676
"""
7777
{ people: [{ name: "John" }, { name: "Jane" }] };

0 commit comments

Comments
 (0)