Json module

json_path_text

procedureextensionsince 0.27.0Source

The error's path in jsonpath form, as jsonb_path_query takes it: $ for the document itself, $.address.tags[2], and a key that is not a plain identifier quoted: $."we ird". Allocated with the temporary allocator.

Example↗
Item :: struct { tags: [..] string; }

_, error := from_json(Item, "{\"tags\": [\"a\", 2]}");
assert(json_path_text(error) == "$.tags[1]");
free_json(*error);
json_path_text :: (error: Json_Error) -> string

Parameters

error: Json_Error

Returns

string

See also