JsonParser¶
High-level JSON parser. Returns a structured result rather than raising.
match JsonParser.parse(source)
| let json: JsonValue => // use json
| let err: JsonParseError => env.err.print(err.string())
end
Built on top of JsonTokenParser — the token parser handles all parsing logic, and an internal tree builder assembles the result.
Constructors¶
create¶
Returns¶
- JsonParser val^
Public Functions¶
parse¶
Parse a complete JSON document from a string.
Parameters¶
- source: String val
Returns¶
- (JsonValue | JsonParseError val)
eq¶
Parameters¶
- that: JsonParser val
Returns¶
- Bool val
ne¶
Parameters¶
- that: JsonParser val
Returns¶
- Bool val