28 #ifndef CASA_JSONOUT_H
29 #define CASA_JSONOUT_H
133 const String& indent=
" ");
154 template <
typename T>
171 template <
typename T>
void put (T value);
177 void put (
const char* value);
186 template <
typename T>
191 template <
typename T>
210 template <
typename T>
214 template <
typename T>
243 #ifndef CASACORE_NO_AUTO_TEMPLATES
244 #include <casacore/casa/Json/JsonOut.tcc>
245 #endif //# CASACORE_NO_AUTO_TEMPLATES
void startNested(const String &name, const String &comment=String())
Start a nested structure; i.e., a field with a structured value.
void putNull()
Write a null value.
void putName(const String &name)
Write the name.
std::complex< Float > Complex
void writeComment(const String &comment)
Write a comment on a separate line.
void put(T value)
Put a scalar value with sufficient accuracy.
static String escapeString(const String &in)
Escape special characters (including control characters) in a string.
void putArray(const Array< T > &value, const String &indent, Bool firstLine)
Put a line defining an array value.
void writeKV(const String &name, T value)
General function to write a key and value.
void endNested()
End a nested structure.
String indentValue(const String &indent, const String &name) const
Get the indentation after a name.
vector< Bool > itsFirstName
Class to fill a file or stream in JSON format.
std::complex< Double > DComplex
A holder for a value of any basic Casacore data type.
void end()
End a structure by clearing the indentation and writing a }.
void start(const String &commentStart=String(), const String &commentEnd=String(), const String &indent=" ")
Start a JSON structure by writing a { and setting the indentation.
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
JsonOut & operator=(const JsonOut &other)
Assignment cannot be used.
JsonOut()
The default constructor creates the output on stdout.
void write(const String &name, T value, const String &comment=String())
Write one or more lines defining a keyword-value pair, where value can be of any type including Array...
String: the storage and methods of handling collections of characters.
~JsonOut()
Close the stream.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.