MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / writeArray

Method writeArray

opt_utils/src/json.cpp:855–870  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

853 result += fi->GetNewline() + fi->GetIndentation(level) + "}";
854 }
855 void Writer::writeArray(const Array &node, unsigned int level)
856 {
857 result += "[" + fi->GetNewline();
858
859 for (Array::const_iterator it = node.begin(); it != node.end(); ++it)
860 {
861 const Node &value = (*it);
862
863 if (it != node.begin())
864 result += "," + fi->GetNewline();
865 result += fi->GetIndentation(level+1);
866 writeNode(value, level+1);
867 }
868
869 result += fi->GetNewline() + fi->GetIndentation(level) + "]";
870 }
871 void Writer::writeValue(const Value &node)
872 {
873 if (node.IsString())

Callers

nothing calls this directly

Calls 3

GetIndentationMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected