1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:54:58 +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:
Andreas Kling 2019-06-18 09:37:47 +02:00
parent 15fa4f1c55
commit aa3df518e7
7 changed files with 20 additions and 20 deletions

View file

@ -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();
}