Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
StreamWriter Class Reference
Usage: More...
#include <writer.h>
Inherited by BuiltStyledStreamWriter.
Data Structures | |
| class | Factory |
| A simple abstract factory. More... | |
Public Member Functions | |
| virtual int | write (Value const &root, JSONCPP_OSTREAM *sout)=0 |
| Write Value into document as configured in sub-class. | |
Detailed Description
Usage:
using namespace Json; void writeToStdout(StreamWriter::Factory const& factory, Value const& value) { std::unique_ptr<StreamWriter> const writer( factory.newStreamWriter()); writer->write(value, &std::cout); std::cout << std::endl; // add lf and flush }
Definition at line 42 of file writer.h.
Member Function Documentation
| virtual int write | ( | Value const & | root, |
| JSONCPP_OSTREAM * | sout | ||
| ) | [pure virtual] |
Write Value into document as configured in sub-class.
Do not take ownership of sout, but maintain a reference during function.
- Precondition:
- sout != NULL
- Returns:
- zero on success (For now, we always return zero, so check the stream instead.)
- Exceptions:
-
std::exception possibly, depending on configuration
Generated on Tue Jul 12 2022 21:24:54 by
1.7.2