|
hoshi-lang dev
Yet another programming language
|
The json standard library module provides functionality for parsing JSON data.
The parse function takes a str.Str object containing JSON data and returns a lang.Result<JSONValue, str.Str>.
Result will be an Ok containing a JSONValue.Result will be an Err containing an error message.The JSONValue interface is a marker interface for the different types of JSON values:
str.Str: For JSON strings.Numeric: For JSON numbers.JSONNull: For JSON null.JSONDict: For JSON objects (a hashMap.HashMap<str.Str, JSONValue>)JSONList: For JSON arrays (a vec.Vec<JSONValue>)