Extracted class JsonSerializer

This commit is contained in:
Benoit Blanchon
2016-09-11 13:43:21 +02:00
parent 6757f35a3a
commit a60b35f41c
12 changed files with 160 additions and 94 deletions

View File

@@ -170,23 +170,6 @@ class JsonArray : public Internals::JsonPrintable<JsonArray>,
return instance;
}
// Serialize the array to the specified JsonWriter.
void writeTo(Internals::JsonWriter &writer) const {
writer.beginArray();
const node_type *child = _firstNode;
while (child) {
child->content.writeTo(writer);
child = child->next;
if (!child) break;
writer.writeComma();
}
writer.endArray();
}
// Imports a 1D array
template <typename T, size_t N>
bool copyFrom(T(&array)[N]) {