Extension: Json and NetCDF utilities
#include "dg/file/file.h" (includes both Json and NetCDF utilities)
|
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <stdexcept>
#include "json/json.h"
Go to the source code of this file.
Classes | |
struct | dg::file::WrappedJsonValue |
Wrapped Access to Json values with error handling. More... | |
Namespaces | |
namespace | dg::file |
Namespace for netCDF output related classes and functions following the CF-conventions and netCDF conventions | |
Enumerations | |
enum class | dg::file::error { dg::file::error::is_throw , dg::file::error::is_warning , dg::file::error::is_silent } |
Switch between how to handle errors in a Json utitlity functions. More... | |
enum class | dg::file::comments { dg::file::comments::are_kept , dg::file::comments::are_discarded , dg::file::comments::are_forbidden } |
Switch how comments are treated in a json string or file. More... | |
Functions | |
static void | dg::file::file2Json (std::string filename, Json::Value &js, enum comments comm=file::comments::are_discarded, enum error err=file::error::is_throw) |
Convenience wrapper to open a file and parse it into a Json::Value. More... | |
static void | dg::file::string2Json (std::string input, Json::Value &js, enum comments comm=file::comments::are_discarded, enum error err=file::error::is_throw) |
Convenience wrapper to parse a string into a Json::Value. More... | |
Json utility functions