![]() |
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.
|
Custom struct to handle both strings and nested JSON objects. More...

Public Member Functions | |
| ComplexJSON (const string &str) | |
| Constructor for string values. | |
| ComplexJSON () | |
| Basic empty constructor. | |
| void | AddObjectEntry (const string &key, unique_ptr< ComplexJSON > object) |
| Adds entry to the underlying map, also sets the type to OBJECT. | |
| void | AddArrayElement (unique_ptr< ComplexJSON > object) |
| Adds element to the underlying list, also sets the type to ARRAY. | |
| ComplexJSON & | GetObject (const string &key) |
| Gets a ComplexJSON object from the map. | |
| ComplexJSON & | GetArrayElement (const idx_t &index) |
| Gets a ComplexJSON element from the list. | |
| string | GetValue (const string &key) const |
| Gets a string version of the underlying ComplexJSON object from the map. | |
| string | GetValue (const idx_t &index) const |
| Gets a string version of the underlying ComplexJSON array from the list. | |
| unordered_map< string, string > | Flatten () const |
| Flattens this json to a top level key -> nested json. | |
Static Public Member Functions | |
| static string | GetValueRecursive (const ComplexJSON &child) |
| Recursive function for GetValue. | |
Private Attributes | |
| string | str_value |
| Basic string value, in case this is the last value of a nested json. | |
| unordered_map< string, unique_ptr< ComplexJSON > > | obj_value |
| If this is a json object a map of key/value. | |
| vector< unique_ptr< ComplexJSON > > | arr_value |
| If this is a json array a list of values. | |
| ComplexJSONType | type |
| If this json is an object (i.e., map or not) | |
Custom struct to handle both strings and nested JSON objects.
|
explicit |
Constructor for string values.
| duckdb::ComplexJSON::ComplexJSON | ( | ) |
Basic empty constructor.
| void duckdb::ComplexJSON::AddObjectEntry | ( | const string & | key, |
| unique_ptr< ComplexJSON > | object | ||
| ) |
Adds entry to the underlying map, also sets the type to OBJECT.
| void duckdb::ComplexJSON::AddArrayElement | ( | unique_ptr< ComplexJSON > | object | ) |
Adds element to the underlying list, also sets the type to ARRAY.
| ComplexJSON & duckdb::ComplexJSON::GetObject | ( | const string & | key | ) |
Gets a ComplexJSON object from the map.
| ComplexJSON & duckdb::ComplexJSON::GetArrayElement | ( | const idx_t & | index | ) |
Gets a ComplexJSON element from the list.
| unordered_map< string, string > duckdb::ComplexJSON::Flatten | ( | ) | const |
Flattens this json to a top level key -> nested json.