mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-15 23:20:05 +02:00
Move old FastWriter stuff out of new Builder
This commit is contained in:
@@ -36,7 +36,7 @@ Usage:
|
||||
std::shared_ptr<StreamWriter> writer(
|
||||
builder.newStreamWriter(&std::cout));
|
||||
writer->write(value);
|
||||
std::cout.flush();
|
||||
std::cout << std::endl; // add lf and flush
|
||||
\endcode
|
||||
*/
|
||||
class JSON_API StreamWriter {
|
||||
@@ -77,24 +77,6 @@ public:
|
||||
Default: "\t"
|
||||
*/
|
||||
Builder& withIndentation(std::string indentation);
|
||||
/** \brief Drop the "null" string from the writer's output for nullValues.
|
||||
* Strictly speaking, this is not valid JSON. But when the output is being
|
||||
* fed to a browser's Javascript, it makes for smaller output and the
|
||||
* browser can handle the output just fine.
|
||||
*/
|
||||
Builder& withDropNullPlaceholders(bool v);
|
||||
/** \brief Do not add \n at end of document.
|
||||
* Normally, we add an extra newline, just because.
|
||||
*/
|
||||
Builder& withOmitEndingLineFeed(bool v);
|
||||
/** \brief Add a space after ':'.
|
||||
* If indentation is non-empty, we surround colon with whitespace,
|
||||
* e.g. " : "
|
||||
* This will add back the trailing space when there is no indentation.
|
||||
* This seems dubious when the entire document is on a single line,
|
||||
* but we leave this here to repduce the behavior of the old `FastWriter`.
|
||||
*/
|
||||
Builder& withEnableYAMLCompatibility(bool v);
|
||||
|
||||
/// Do not take ownership of sout, but maintain a reference.
|
||||
StreamWriter* newStreamWriter(std::ostream* sout) const;
|
||||
|
Reference in New Issue
Block a user