Skip to content

Commit

Permalink
Add more details contrasting fromString and jsonParser (#45)
Browse files Browse the repository at this point in the history
* Add more details contrasting `fromString` and `jsonParser`

* Clarify json object language
  • Loading branch information
milesfrain authored Nov 6, 2020
1 parent 19f9fd1 commit 78a8b76
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Data/Argonaut/Core.purs
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,11 @@ foreign import fromBoolean :: Boolean -> Json
-- | Construct `Json` from a `Number` value
foreign import fromNumber :: Number -> Json

-- | Construct `Json` from a `String` value. If you would like to parse a string
-- | of JSON into valid `Json`, see `jsonParser`.
-- | Construct the `Json` representation of a `String` value.
-- | Note that this function only produces `Json` containing a single piece of `String`
-- | data (similar to `fromBoolean`, `fromNumber`, etc.).
-- | This function does NOT convert the `String` encoding of a JSON value to `Json` - For that
-- | purpose, you'll need to use `jsonParser`.
foreign import fromString :: String -> Json

-- | Construct `Json` from an array of `Json` values
Expand Down

0 comments on commit 78a8b76

Please sign in to comment.