pub fn parse_json(
schema: &Schema,
root_vertex: &str,
json_val: &Value,
) -> Result<WInstance, ParseError>Expand description
Parse JSON into a W-type instance, guided by a schema.
The parser starts at root_vertex in the schema and recursively
walks the JSON structure, creating nodes for each schema vertex
encountered. Property edges guide which JSON fields become child
nodes.
§Errors
Returns ParseError if the JSON structure doesn’t match the
schema or contains invalid values.