Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb_yyjson::yyjson_ptr_ctx Struct Reference
Collaboration diagram for duckdb_yyjson::yyjson_ptr_ctx:

Public Attributes

yyjson_mut_val * ctn
yyjson_mut_val * pre
yyjson_mut_val * old

Detailed Description

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:

// doc before: {"a":[0,1,null]}
// ptr: "/a/2"
val = yyjson_mut_doc_ptr_getx(doc, ptr, strlen(ptr), &ctx, &err);
if (yyjson_is_null(val)) {
}
// doc after: {"a":[0,1]}
yyjson_api_inline bool yyjson_ptr_ctx_remove(yyjson_ptr_ctx *ctx)
Definition duckdb.cpp:44734
yyjson_api_inline bool yyjson_is_null(yyjson_val *val)
Definition duckdb.cpp:41899
yyjson_api_inline yyjson_mut_val * yyjson_mut_doc_ptr_getx(yyjson_mut_doc *doc, const char *ptr, size_t len, yyjson_ptr_ctx *ctx, yyjson_ptr_err *err)
Definition duckdb.cpp:44228

Member Data Documentation

◆ ctn

yyjson_mut_val* duckdb_yyjson::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.

◆ pre

yyjson_mut_val* duckdb_yyjson::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.

◆ old

yyjson_mut_val* duckdb_yyjson::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.


The documentation for this struct was generated from the following file: