20 #ifndef JSON_OBJECT_HPP
21 #define JSON_OBJECT_HPP
26 #include <opm/common/utility/FileSystem.hpp>
36 explicit JsonObject(
const std::filesystem::path& jsonFile );
37 explicit JsonObject(
const std::string& inline_json);
42 void add(
double value);
44 void add(
const std::string& value);
47 void add_item(
const std::string& key,
double value);
48 void add_item(
const std::string& key,
int value);
49 void add_item(
const std::string& key,
const std::string& value);
52 std::string dump()
const;
54 bool has_item(
const std::string& key)
const;
55 JsonObject get_array_item(
size_t index )
const;
56 JsonObject get_item(
const std::string& key)
const;
58 std::string to_string()
const;
59 std::string get_string(
const std::string& key)
const;
60 std::string as_string()
const;
61 bool is_string( )
const;
63 bool is_number( )
const;
64 int get_int(
const std::string& key)
const;
66 double get_double(
const std::string& key)
const;
67 double as_double()
const;
69 bool is_array( )
const;
70 bool is_object( )
const;
74 JsonObject get_scalar_object(
const std::string& key)
const;
75 void initialize(
const std::string& inline_json);
Definition: JsonObject.hpp:32