6 #ifndef JSON_WRITER_H_INCLUDED 7 #define JSON_WRITER_H_INCLUDED 9 #if !defined(JSON_IS_AMALGAMATION) 11 #endif // if !defined(JSON_IS_AMALGAMATION) 18 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) 20 #pragma warning(disable : 4251) 21 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) 127 bool validate(
Json::
Value* invalid) const;
137 static
void setDefaults(
Json::
Value* settings);
165 void enableYAMLCompatibility();
172 void dropNullPlaceholders();
174 void omitEndingLineFeed();
180 void writeValue(
const Value& value);
183 bool yamlCompatiblityEnabled_;
184 bool dropNullPlaceholders_;
185 bool omitEndingLineFeed_;
225 void writeValue(
const Value& value);
226 void writeArrayValue(
const Value& value);
227 bool isMultineArray(
const Value& value);
233 void writeCommentBeforeValue(
const Value& root);
234 void writeCommentAfterValueOnSameLine(
const Value& root);
235 bool hasCommentForValue(
const Value& value);
238 typedef std::vector<JSONCPP_STRING> ChildValues;
240 ChildValues childValues_;
243 unsigned int rightMargin_;
244 unsigned int indentSize_;
245 bool addChildValues_;
291 void writeValue(
const Value& value);
292 void writeArrayValue(
const Value& value);
293 bool isMultineArray(
const Value& value);
299 void writeCommentBeforeValue(
const Value& root);
300 void writeCommentAfterValueOnSameLine(
const Value& root);
301 bool hasCommentForValue(
const Value& value);
304 typedef std::vector<JSONCPP_STRING> ChildValues;
306 ChildValues childValues_;
309 unsigned int rightMargin_;
311 bool addChildValues_ : 1;
315 #if defined(JSON_HAS_INT64) 318 #endif // if defined(JSON_HAS_INT64) 333 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) 335 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) 337 #endif // JSON_WRITER_H_INCLUDED Outputs a Value in JSON format without formatting (not human friendly).
#define JSONCPP_DEPRECATED(message)
A simple abstract factory.
Writes a Value in JSON format in a human friendly way.
#define JSON_API
If defined, indicates that the source file is amalgated to prevent private header inclusion...
std::string valueToQuotedString(const char *value)
std::string valueToString(Int value)
JSON (JavaScript Object Notation).
Json::Value settings_
Configuration of this builder.
Abstract class for writers.
Writes a Value in JSON format in a human friendly way, to a stream rather than to a string...
std::string writeString(StreamWriter::Factory const &factory, Value const &root)
Write into stringstream, then return string, for convenience.
std::ostream & operator<<(std::ostream &, const Value &root)
Output using the StyledStreamWriter.
Build a StreamWriter implementation.