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) && defined(_MSC_VER) 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);
159 #if defined(_MSC_VER) 160 #pragma warning(push) 161 #pragma warning(disable:4996) // Deriving from deprecated class 168 void enableYAMLCompatibility();
175 void dropNullPlaceholders();
177 void omitEndingLineFeed();
183 void writeValue(
const Value& value);
186 bool yamlCompatibilityEnabled_;
187 bool dropNullPlaceholders_;
188 bool omitEndingLineFeed_;
190 #if defined(_MSC_VER) 218 #if defined(_MSC_VER) 219 #pragma warning(push) 220 #pragma warning(disable:4996) // Deriving from deprecated class 235 void writeValue(
const Value& value);
236 void writeArrayValue(
const Value& value);
237 bool isMultilineArray(
const Value& value);
243 void writeCommentBeforeValue(
const Value& root);
244 void writeCommentAfterValueOnSameLine(
const Value& root);
245 bool hasCommentForValue(
const Value& value);
248 typedef std::vector<JSONCPP_STRING> ChildValues;
250 ChildValues childValues_;
253 unsigned int rightMargin_;
254 unsigned int indentSize_;
255 bool addChildValues_;
257 #if defined(_MSC_VER) 286 #if defined(_MSC_VER) 287 #pragma warning(push) 288 #pragma warning(disable:4996) // Deriving from deprecated class 308 void writeValue(
const Value& value);
309 void writeArrayValue(
const Value& value);
310 bool isMultilineArray(
const Value& value);
316 void writeCommentBeforeValue(
const Value& root);
317 void writeCommentAfterValueOnSameLine(
const Value& root);
318 bool hasCommentForValue(
const Value& value);
321 typedef std::vector<JSONCPP_STRING> ChildValues;
323 ChildValues childValues_;
326 unsigned int rightMargin_;
328 bool addChildValues_ : 1;
331 #if defined(_MSC_VER) 335 #if defined(JSON_HAS_INT64) 338 #endif // if defined(JSON_HAS_INT64) 353 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) 355 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) 357 #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 amalgamated 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.