JSON array builder.
More...
#include <src/tooling/query/json.h>
JSON array builder.
Definition at line 146 of file json.h.
◆ JsonArray()
| ascii_query::json::JsonArray::JsonArray |
( |
| ) |
|
|
default |
◆ add() [1/3]
◆ add() [2/3]
◆ add() [3/3]
Definition at line 150 of file json.h.
150 {
151 values_.push_back(value);
152 return *this;
153 }
◆ empty()
| bool ascii_query::json::JsonArray::empty |
( |
| ) |
const |
|
inline |
Definition at line 175 of file json.h.
175 {
176 return values_.empty();
177 }
◆ size()
| size_t ascii_query::json::JsonArray::size |
( |
| ) |
const |
|
inline |
Definition at line 178 of file json.h.
178 {
179 return values_.size();
180 }
◆ toString()
| std::string ascii_query::json::JsonArray::toString |
( |
| ) |
const |
|
inline |
Definition at line 162 of file json.h.
162 {
163 std::string result = "[";
164 bool first = true;
165 for (const auto &v : values_) {
166 if (!first)
167 result += ",";
168 first = false;
169 result += v.toString();
170 }
171 result += "]";
172 return result;
173 }
Referenced by add(), and ascii_query::json::JsonObject::set().
The documentation for this class was generated from the following file: