mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
25 lines
565 B
C
25 lines
565 B
C
|
#pragma once
|
||
|
|
||
|
#include <AK/JsonValue.h>
|
||
|
#include <AK/Vector.h>
|
||
|
|
||
|
class JsonArray {
|
||
|
public:
|
||
|
JsonArray() {}
|
||
|
~JsonArray() {}
|
||
|
|
||
|
int size() const { return m_values.size(); }
|
||
|
bool is_empty() const { return m_values.is_empty(); }
|
||
|
|
||
|
const JsonValue& at(int index) const { return m_values.at(index); }
|
||
|
const JsonValue& operator[](int index) const { return at(index); }
|
||
|
|
||
|
void clear() { m_values.clear(); }
|
||
|
void append(const JsonValue& value) { m_values.append(value); }
|
||
|
|
||
|
String to_string() const;
|
||
|
|
||
|
private:
|
||
|
Vector<JsonValue> m_values;
|
||
|
};
|