mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
AK: Rename JsonObject::to_string() and pals to serialized().
And the variant that serializes into a StringBuilder is called serialize().
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
namespace AK {
|
||||
|
||||
void JsonObject::to_string(StringBuilder& builder) const
|
||||
void JsonObject::serialize(StringBuilder& builder) const
|
||||
{
|
||||
int index = 0;
|
||||
builder.append('{');
|
||||
@@ -12,7 +12,7 @@ void JsonObject::to_string(StringBuilder& builder) const
|
||||
builder.append(key);
|
||||
builder.append('"');
|
||||
builder.append(':');
|
||||
value.to_string(builder);
|
||||
value.serialize(builder);
|
||||
if (index != size() - 1)
|
||||
builder.append(',');
|
||||
++index;
|
||||
@@ -20,10 +20,10 @@ void JsonObject::to_string(StringBuilder& builder) const
|
||||
builder.append('}');
|
||||
}
|
||||
|
||||
String JsonObject::to_string() const
|
||||
String JsonObject::serialized() const
|
||||
{
|
||||
StringBuilder builder;
|
||||
to_string(builder);
|
||||
serialize(builder);
|
||||
return builder.to_string();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user