Move old FastWriter stuff out of new Builder

This commit is contained in:
Christopher Dunn
2015-01-26 10:43:39 -06:00
parent 177b7b8f22
commit 28a20917b0
3 changed files with 6 additions and 67 deletions

View File

@@ -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;