An wrapper for Ostream that outputs content in JSON format. More...
#include <JSONformatter.H>
Public Member Functions | |
| TypeName ("JSONformatter") | |
| Declare type-name. | |
| JSONformatter (Ostream &os) | |
| Construct from Ostream. | |
| virtual | ~JSONformatter ()=default |
| Destructor. | |
| virtual Ostream & | write (const bool val) |
| virtual Ostream & | write (const int32_t val) |
| virtual Ostream & | write (const int64_t val) |
| virtual Ostream & | write (const float val) |
| virtual Ostream & | write (const double val) |
| virtual Ostream & | write (const word &str) |
| virtual Ostream & | write (const std::string &str) |
| virtual Ostream & | write (const char *str) |
| virtual Ostream & | writeKeyword (const keyType &keyword) |
| Write JSON keyword. | |
| virtual Ostream & | writeDict (const dictionary &dict) |
| Write OpenFOAM dictionary to JSON dictionary. | |
| template<class Type> | |
| Ostream & | writeEntry (const word &keyword, const Type &val) |
| Write JSON keyword-value pair (for primitive types). | |
An wrapper for Ostream that outputs content in JSON format.
Definition at line 47 of file JSONformatter.H.
|
explicit |
Construct from Ostream.
Definition at line 85 of file JSONformatter.C.
References os().

|
virtualdefault |
Destructor.
References dict.
| TypeName | ( | "JSONformatter" | ) |
|
virtual |
Definition at line 213 of file JSONformatter.C.
|
virtual |
Definition at line 220 of file JSONformatter.C.
|
virtual |
Definition at line 227 of file JSONformatter.C.
|
virtual |
Definition at line 234 of file JSONformatter.C.
|
virtual |
Definition at line 241 of file JSONformatter.C.
|
virtual |
Definition at line 248 of file JSONformatter.C.
References Ostream::writeQuoted().

|
virtual |
Definition at line 254 of file JSONformatter.C.
References Ostream::writeQuoted().

|
virtual |
Definition at line 260 of file JSONformatter.C.
|
virtual |
Write JSON keyword.
Definition at line 93 of file JSONformatter.C.
References Ostream::writeQuoted().

|
virtual |
Write OpenFOAM dictionary to JSON dictionary.
Definition at line 102 of file JSONformatter.C.
References token::BEGIN_LIST, token::BEGIN_SQR, Foam::decrIndent(), dict, e, token::END_LIST, token::END_SQR, Foam::endl(), forAll, Foam::incrIndent(), Foam::indent(), Foam::nl, WarningInFunction, and writeDict().
Referenced by caseInfo::write(), and writeDict().


Write JSON keyword-value pair (for primitive types).
Definition at line 110 of file JSONformatter.H.
References write(), and Ostream::writeQuoted().
