mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-15 23:20:05 +02:00
implement strange setting from FastWriter
This commit is contained in:
@@ -74,6 +74,24 @@ public:
|
||||
Default: "\t"
|
||||
*/
|
||||
void setIndentation(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.
|
||||
*/
|
||||
void setDropNullPlaceholders(bool v);
|
||||
/** \brief Do not add \n at end of document.
|
||||
* Normally, we add an extra newline, just because.
|
||||
*/
|
||||
void setOmitEndingLineFeed(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`.
|
||||
*/
|
||||
void setEnableYAMLCompatibility(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