| 356 | } |
| 357 | |
| 358 | FormattedJson FormattedJson::eraseIndex(size_t index) const { |
| 359 | if (type() != Json::Type::Array) |
| 360 | throw JsonException::format("Cannot call set with index on FormattedJson type {}, must be Array type", typeName()); |
| 361 | |
| 362 | if (index >= m_arrayElementLocations.size()) |
| 363 | throw JsonException::format("FormattedJson::eraseIndex({}) out of range", index); |
| 364 | |
| 365 | ElementLocation loc = m_arrayElementLocations.at(index); |
| 366 | ElementList elements = m_elements; |
| 367 | removeValueFromArray(elements, loc); |
| 368 | return array(elements); |
| 369 | } |
| 370 | |
| 371 | size_t FormattedJson::size() const { |
| 372 | return m_jsonValue.size(); |
nothing calls this directly
no test coverage detected