|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_UTILS_FORMATS_JSON_WRITER_H_
2 #define GENESIS_UTILS_FORMATS_JSON_WRITER_H_
84 void write(
JsonDocument const& document, std::shared_ptr<utils::BaseOutputTarget> target )
const;
100 void print_value (
JsonDocument const& value, std::ostream& out)
const;
105 void print_array (
JsonDocument const& value, std::ostream& out,
int indent_level)
const;
110 void print_object (
JsonDocument const& value, std::ostream& out,
int indent_level)
const;
162 size_t precision_ = 6;
170 #endif // include guard
std::string to_string(JsonDocument const &document) const
Return the Json representation of a JsonDocument.
JsonWriter & precision(size_t value)
Set the precision used for printing floating point numbers.
JsonWriter & operator=(JsonWriter const &)=default
void write(JsonDocument const &document, std::shared_ptr< utils::BaseOutputTarget > target) const
Write a JsonDocument to an output target, using the JSON format.
size_t precision() const
Get the precision used for printing floating point numbers.
Store a Json value of any kind.
Write Json data from a JsonDocument.
JsonWriter & indent(size_t value)
Set the indent used for printing the elements of Json arrays and objects.
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
size_t indent() const
Get the indent used for printing the elements of Json arrays and objects.