mirror of
https://github.com/SerenityOS/serenity
synced 2024-11-05 17:46:52 +00:00
24 lines
466 B
C++
24 lines
466 B
C++
#include <AK/JsonArray.h>
|
|
#include <AK/StringBuilder.h>
|
|
|
|
namespace AK {
|
|
|
|
void JsonArray::to_string(StringBuilder& builder) const
|
|
{
|
|
builder.append('[');
|
|
for (int i = 0; i < m_values.size(); ++i) {
|
|
m_values[i].to_string(builder);
|
|
if (i != size() - 1)
|
|
builder.append(',');
|
|
}
|
|
builder.append(']');
|
|
}
|
|
|
|
String JsonArray::to_string() const
|
|
{
|
|
StringBuilder builder;
|
|
to_string(builder);
|
|
return builder.to_string();
|
|
}
|
|
|
|
}
|