Util: Add JSON accessors

This commit is contained in:
Riyyi
2022-06-16 11:38:22 +02:00
parent 5188d57d19
commit c385432bb0
5 changed files with 23 additions and 2 deletions
+4
View File
@@ -40,6 +40,10 @@ public:
Value(const Array& value);
Value(const Object& value);
// Array index operator
Value operator[](size_t index);
Value operator[](const std::string& key);
bool asBool() const { return m_value.asBool; }
double asDouble() const { return m_value.asDouble; }
const std::string& asString() const { return *m_value.asString; }