Releases the message and path of an error and clears it.
free_json :: (error: *Json_Error)
Parameters
- error: *Json_Error
free_json :: (value: *$T)
The one way to release what the decoders allocated, for a decoded value of any type, a
Json_Value or a Json_Error. For a typed value: its strings, arrays, pointers (and what they
point to), tables and nested values, all with free. The fields are reset, so a second call
does nothing. A field that still holds its declared default (a document that omitted it) is
not freed, so defaults such as name := "guest" are safe. Fields with a with= handler are
left to the handler. Do not use it on values that were not decoded, as their strings may not
have come from the allocator.
Parameters
- value: *$T
names, _ := from_json([] string, "[\"a\", \"b\"]");
free_json(*names);
assert(names.count == 0);free_json :: (value: *Json_Value)
Releases everything value owns and leaves it null.
Parameters
- value: *Json_Value