Skip to content

Commit 78a8b76

Browse files
authored
Add more details contrasting fromString and jsonParser (#45)
* Add more details contrasting `fromString` and `jsonParser` * Clarify json object language
1 parent 19f9fd1 commit 78a8b76

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Data/Argonaut/Core.purs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,11 @@ foreign import fromBoolean :: Boolean -> Json
185185
-- | Construct `Json` from a `Number` value
186186
foreign import fromNumber :: Number -> Json
187187

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

192195
-- | Construct `Json` from an array of `Json` values

0 commit comments

Comments
 (0)