|
template<typename Value > |
ItemsWrapper< Value > | Items (Value &&value) |
| Wrapper for handy python-like iteration over a map.
|
|
template<typename Value > |
void | Merge (typename Value::Builder &original, const Value &patch) |
| Add to original new non-object elements from patch (overwriting the old ones, if any) and merge object elements recursively.
|
|
std::string | GetIndexString (size_t index) |
| Returns string of [idx], e.g. "[0]" or "[1025]".
|
|
void | AppendPath (std::string &path, std::string_view key) |
|
void | AppendPath (std::string &path, std::size_t index) |
|
std::string | MakeChildPath (std::string_view parent, std::string_view key) |
|
std::string | MakeChildPath (std::string &&parent, std::string_view key) |
|
std::string | MakeChildPath (std::string_view parent, std::size_t index) |
|
std::string | MakeChildPath (std::string &&parent, std::size_t index) |
|
template<typename Value > |
std::enable_if_t< common::kIsFormatValue< Value >, Value > | GetAtPath (Value parent, const std::vector< std::string > &path) |
| Get the Value at path in parent .
|
|
template<typename ValueBuilder > |
std::enable_if_t<!common::kIsFormatValue< ValueBuilder >, ValueBuilder > | GetAtPath (ValueBuilder &parent, std::vector< std::string > &&path) |
| Get the ValueBuilder at path in parent .
|
|
template<typename Value > |
void | SetAtPath (typename Value::Builder &parent, std::vector< std::string > &&path, Value new_value) |
| Set the new_value along the path in the parent .
|
|
template<typename ValueBuilder > |
void | RemoveAtPath (ValueBuilder &parent, std::vector< std::string > &&path) |
| Remove the element along the path in the parent .
|
|
std::vector< std::string > | SplitPathString (std::string_view path) |
| Split path to vector<std::string> by dots.
|
|