mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:27:35 +00:00
AK: Use a single StringBuilder throughout JSON serialization.
This commit is contained in:
parent
3b9fcab1af
commit
ee347effac
6 changed files with 77 additions and 16 deletions
|
@ -2,8 +2,11 @@
|
|||
|
||||
#include <AK/AKString.h>
|
||||
|
||||
namespace AK {
|
||||
|
||||
class JsonArray;
|
||||
class JsonObject;
|
||||
class StringBuilder;
|
||||
|
||||
class JsonValue {
|
||||
public:
|
||||
|
@ -35,6 +38,7 @@ public:
|
|||
JsonValue(const JsonObject&);
|
||||
|
||||
String to_string() const;
|
||||
void to_string(StringBuilder&) const;
|
||||
|
||||
private:
|
||||
void clear();
|
||||
|
@ -51,3 +55,7 @@ private:
|
|||
bool as_bool;
|
||||
} m_value;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
using AK::JsonValue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue