6#ifndef NIM_CPP_WRAPPER_UTIL_JSON_WRITER_H_INCLUDED
7#define NIM_CPP_WRAPPER_UTIL_JSON_WRITER_H_INCLUDED
9#if !defined(JSON_IS_AMALGAMATION)
18#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) && defined(_MSC_VER)
20#pragma warning(disable : 4251)
166#pragma warning(disable : 4996)
173 void enableYAMLCompatibility();
180 void dropNullPlaceholders();
182 void omitEndingLineFeed();
188 void writeValue(
const Value& value);
191 bool yamlCompatibilityEnabled_{
false};
192 bool dropNullPlaceholders_{
false};
193 bool omitEndingLineFeed_{
false};
225#pragma warning(disable : 4996)
240 void writeValue(
const Value& value);
241 void writeArrayValue(
const Value& value);
242 bool isMultilineArray(
const Value& value);
243 void pushValue(
const String& value);
245 void writeWithIndent(
const String& value);
248 void writeCommentBeforeValue(
const Value& root);
249 void writeCommentAfterValueOnSameLine(
const Value& root);
250 static bool hasCommentForValue(
const Value& value);
258 unsigned int rightMargin_{74};
259 unsigned int indentSize_{3};
260 bool addChildValues_{
false};
293#pragma warning(disable : 4996)
313 void writeValue(
const Value& value);
314 void writeArrayValue(
const Value& value);
315 bool isMultilineArray(
const Value& value);
316 void pushValue(
const String& value);
318 void writeWithIndent(
const String& value);
321 void writeCommentBeforeValue(
const Value& root);
322 void writeCommentAfterValueOnSameLine(
const Value& root);
323 static bool hasCommentForValue(
const Value& value);
331 unsigned int rightMargin_{74};
340#if defined(JSON_HAS_INT64)
361#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
Outputs a Value in JSON format without formatting (not human friendly).
Definition: writer.h:168
String document_
Definition: writer.h:190
~FastWriter() override=default
A simple abstract factory.
Definition: writer.h:59
virtual StreamWriter * newStreamWriter() const =0
Allocate a CharReader via operator new().
Build a StreamWriter implementation.
Definition: writer.h:89
nim_cpp_wrapper_util::Json::Value settings_
Definition: writer.h:119
~StreamWriterBuilder() override
OStream * sout_
Definition: writer.h:44
virtual int write(Value const &root, OStream *sout)=0
Writes a Value in JSON format in a human friendly way, to a stream rather than to a string.
Definition: writer.h:295
ChildValues childValues_
Definition: writer.h:328
String indentString_
Definition: writer.h:330
static String normalizeEOL(const String &text)
OStream * document_
Definition: writer.h:329
String indentation_
Definition: writer.h:332
bool addChildValues_
Definition: writer.h:333
std::vector< String > ChildValues
Definition: writer.h:326
~StyledStreamWriter()=default
bool indented_
Definition: writer.h:334
Writes a Value in JSON format in a human friendly way.
Definition: writer.h:227
ChildValues childValues_
Definition: writer.h:255
String indentString_
Definition: writer.h:257
String document_
Definition: writer.h:256
static String normalizeEOL(const String &text)
std::vector< String > ChildValues
Definition: writer.h:253
~StyledWriter() override=default
Represents a JSON value.
Definition: value.h:196
static constexpr UInt defaultRealPrecision
Default precision for real value for string representation.
Definition: value.h:248
Abstract class for writers.
Definition: writer.h:148
virtual String write(const Value &root)=0
#define JSON_API
Definition: config.h:50
PrecisionType
Type of precision for formatting of real values.
Definition: value.h:130
@ significantDigits
we set max number of significant digits in string
Definition: value.h:131
UInt64 LargestUInt
Definition: config.h:104
unsigned int UInt
Definition: config.h:89
int Int
Definition: config.h:88
std::ostream OStream
Definition: config.h:114
Int64 LargestInt
Definition: config.h:103
String JSON_API valueToString(Int value)
String JSON_API valueToQuotedString(const char *value)
Definition: json_writer.cpp:346
std::basic_string< char, std::char_traits< char >, Allocator< char > > String
Definition: config.h:110
JSON_API OStream & operator<<(OStream &, const Value &root)
Output using the StyledStreamWriter.
Definition: json_writer.cpp:1257
String JSON_API writeString(StreamWriter::Factory const &factory, Value const &root)
Write into stringstream, then return string, for convenience. A StreamWriter will be created from the...
Definition: json_writer.cpp:1250
JSON (JavaScript Object Notation).
Definition: allocator.h:14