std::encoding::jsonJSON parsing and manipulation.
Parse JSON strings into values, inspect their types, extract fields, and convert back to JSON text.
import std::encoding::json;
fn main() {
let val = json.parse("{\"name\": \"Hew\", \"version\": 1}");
let name = val.get_field("name");
println(name.get_string());
name.free();
val.free();
}
parseParse a JSON string into a Value.
Panics if the input is not valid JSON.
let obj = json.parse("{\"key\": [1, 2, 3]}");
ValueAn opaque JSON value.
Represents any JSON type: null, bool, integer, float, String, array,
or object. Created by json.parse(s) or by navigating into a
parsed value. Must be freed with free() when no longer needed.
ValueMethodsMethods available on a JSON Value.