|
Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
|
#include <yyjson.h>
Data Fields | |
| yyjson_mut_val * | ctn |
| yyjson_mut_val * | pre |
| yyjson_mut_val * | old |
A context for JSON pointer operation.
This struct stores the context of JSON Pointer operation result. The struct can be used with three helper functions: ctx_append(), ctx_replace(), and ctx_remove(), which perform the corresponding operations on the container without re-parsing the JSON Pointer.
For example:
| yyjson_mut_val* yyjson_ptr_ctx::ctn |
The container (parent) of the target value. It can be either an array or an object. If the target location has no value, but all its parent containers exist, and the target location can be used to insert a new value, then ctn is the parent container of the target location. Otherwise, ctn is NULL.
Definition at line 4334 of file yyjson.h.
Referenced by unsafe_yyjson_mut_ptr_getx(), unsafe_yyjson_mut_ptr_putx(), unsafe_yyjson_mut_ptr_removex(), and unsafe_yyjson_mut_ptr_replacex().
| yyjson_mut_val* yyjson_ptr_ctx::old |
The removed value if the operation is set, replace or remove. It can be used to restore the original state of the document if needed.
Definition at line 4348 of file yyjson.h.
Referenced by unsafe_yyjson_mut_ptr_putx(), unsafe_yyjson_mut_ptr_removex(), and unsafe_yyjson_mut_ptr_replacex().
| yyjson_mut_val* yyjson_ptr_ctx::pre |
The previous sibling of the target value. It can be either a value in an array or a key in an object. As the container is a circular linked list of elements, pre is the previous node of the target value. If the operation is add or set, then pre is the previous node of the new value, not the original target value. If the target value does not exist, pre is NULL.
Definition at line 4343 of file yyjson.h.
Referenced by unsafe_yyjson_mut_ptr_getx(), unsafe_yyjson_mut_ptr_putx(), unsafe_yyjson_mut_ptr_removex(), and unsafe_yyjson_mut_ptr_replacex().