22#ifndef GENERIC_CONTAINER_INTERFACE_JSON_HH
23#define GENERIC_CONTAINER_INTERFACE_JSON_HH
51 string const & file_name,
54 ifstream stream(file_name.data());
95 istringstream stream(DATA);
112 ostringstream stream;
The GenericContainer class provides a flexible container for storing heterogeneous data types.
Definition GenericContainer.hh:614
bool from_json(istream_type &stream)
Returns a string containing the contents of the GenericContainer in JSON format.
void to_json(ostream_type &stream, string_view prefix="") const
Serializes the contents of the GenericContainer into JSON format and writes it to the provided output...
void clear()
Clears the content of the GenericContainer, resetting it to an empty state.
Definition GenericContainer.cc:592
void GC_to_JSON(GenericContainer const &gc, std::string &res)
Definition GenericContainerInterface_json.hh:111
bool JSON_to_GC(istream_type &stream, GenericContainer &gc)
Definition GenericContainerInterface_json.hh:71
bool file_JSON_to_GC(string const &file_name, GenericContainer &gc)
Definition GenericContainerInterface_json.hh:50
Definition GenericContainer.cc:68
std::basic_ostream< char > ostream_type
Alias for a character-based output stream.
Definition GenericContainer.hh:109
std::basic_istream< char > istream_type
Alias for a character-based input stream.
Definition GenericContainer.hh:118