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.
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