1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:27:45 +00:00

AK: Use a single StringBuilder throughout JSON serialization.

This commit is contained in:
Andreas Kling 2019-06-17 21:34:12 +02:00
parent 3b9fcab1af
commit ee347effac
6 changed files with 77 additions and 16 deletions

View file

@ -3,6 +3,8 @@
#include <AK/JsonValue.h>
#include <AK/Vector.h>
namespace AK {
class JsonArray {
public:
JsonArray() {}
@ -18,7 +20,12 @@ public:
void append(const JsonValue& value) { m_values.append(value); }
String to_string() const;
void to_string(StringBuilder&) const;
private:
Vector<JsonValue> m_values;
};
}
using AK::JsonArray;