Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ In general, if a JavaScript value could be returned from a call to `JSON.parse`
You can also use the construction functions which follow the naming convention `fromX` or `jsonX`:

```purs
import Data.Argonaut.Core
import Data.Tuple (Tuple(..))
import Foreign.Object as Object
import Data.Argonaut.Core as A
Expand All @@ -67,8 +68,9 @@ someObject =
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.

```purs
import Data.Argonaut.Core
import Data.Argonaut.Parser (jsonParser)
import Data.Maybe (Maybe(..))
import Data.Either (Either)

someObject :: Either String Json
someObject = jsonParser
Expand Down