mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 18:05:07 +00:00
AK: Support taking JSON values out of a JSON array
This commit is contained in:
parent
2c3ff6bb74
commit
09c59ee7c0
1 changed files with 2 additions and 0 deletions
|
@ -55,6 +55,8 @@ public:
|
||||||
[[nodiscard]] JsonValue const& at(size_t index) const { return m_values.at(index); }
|
[[nodiscard]] JsonValue const& at(size_t index) const { return m_values.at(index); }
|
||||||
[[nodiscard]] JsonValue const& operator[](size_t index) const { return at(index); }
|
[[nodiscard]] JsonValue const& operator[](size_t index) const { return at(index); }
|
||||||
|
|
||||||
|
[[nodiscard]] JsonValue take(size_t index) { return m_values.take(index); }
|
||||||
|
|
||||||
void clear() { m_values.clear(); }
|
void clear() { m_values.clear(); }
|
||||||
void append(JsonValue value) { m_values.append(move(value)); }
|
void append(JsonValue value) { m_values.append(move(value)); }
|
||||||
void set(size_t index, JsonValue value) { m_values[index] = move(value); }
|
void set(size_t index, JsonValue value) { m_values[index] = move(value); }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue