56 virtual std::string write(
const Value &root ) = 0;
70 void enableYAMLCompatibility();
73 virtual std::string write(
const Value &root );
76 void writeValue(
const Value &value );
78 std::string document_;
79 bool yamlCompatiblityEnabled_;
110 virtual std::string write(
const Value &root );
113 void writeValue(
const Value &value );
114 void writeArrayValue(
const Value &value );
115 bool isMultineArray(
const Value &value );
116 void pushValue(
const std::string &value );
118 void writeWithIndent(
const std::string &value );
121 void writeCommentBeforeValue(
const Value &root );
122 void writeCommentAfterValueOnSameLine(
const Value &root );
123 bool hasCommentForValue(
const Value &value );
124 static std::string normalizeEOL(
const std::string &text );
126 typedef std::vector<std::string> ChildValues;
128 ChildValues childValues_;
129 std::string document_;
130 std::string indentString_;
133 bool addChildValues_;
168 void write( std::ostream &out,
const Value &root );
171 void writeValue(
const Value &value );
172 void writeArrayValue(
const Value &value );
173 bool isMultineArray(
const Value &value );
174 void pushValue(
const std::string &value );
176 void writeWithIndent(
const std::string &value );
179 void writeCommentBeforeValue(
const Value &root );
180 void writeCommentAfterValueOnSameLine(
const Value &root );
181 bool hasCommentForValue(
const Value &value );
182 static std::string normalizeEOL(
const std::string &text );
184 typedef std::vector<std::string> ChildValues;
186 ChildValues childValues_;
187 std::ostream* document_;
188 std::string indentString_;
190 std::string indentation_;
191 bool addChildValues_;
194 std::string JSON_API valueToString( Int value );
195 std::string JSON_API valueToString( UInt value );
196 std::string JSON_API valueToString(
double value );
197 std::string JSON_API valueToString(
bool value );
198 std::string JSON_API valueToQuotedString(
const char *value );