mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +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:
parent
15fa4f1c55
commit
aa3df518e7
Notes:
sideshowbarker
2024-07-19 13:33:10 +09:00
Author: https://github.com/awesomekling
Commit: aa3df518e7
7 changed files with 20 additions and 20 deletions
|
@ -3,21 +3,21 @@
|
|||
|
||||
namespace AK {
|
||||
|
||||
void JsonArray::to_string(StringBuilder& builder) const
|
||||
void JsonArray::serialize(StringBuilder& builder) const
|
||||
{
|
||||
builder.append('[');
|
||||
for (int i = 0; i < m_values.size(); ++i) {
|
||||
m_values[i].to_string(builder);
|
||||
m_values[i].serialize(builder);
|
||||
if (i != size() - 1)
|
||||
builder.append(',');
|
||||
}
|
||||
builder.append(']');
|
||||
}
|
||||
|
||||
String JsonArray::to_string() const
|
||||
String JsonArray::serialized() const
|
||||
{
|
||||
StringBuilder builder;
|
||||
to_string(builder);
|
||||
serialize(builder);
|
||||
return builder.to_string();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue