PISM, A Parallel Ice Sheet Model  stable v2.1.1 committed by Constantine Khrulev on 2024-12-04 13:36:58 -0900

◆ set_value()

static void pism::set_value ( json_t *  data,
const std::string &  name,
json_t *  value 
)
static

Store a 'value' corresponding to the key 'name' in the database 'data'.

If a name refers to an object "alice.bob", the object "alice" must exist in the tree already, but "bob" may not exist before this call and will be created. In other words, this method allows adding new leaves only.

Definition at line 186 of file ConfigJSON.cc.

References find_json_value(), pism::RuntimeError::formatted(), join(), PISM_ERROR_LOCATION, and split().

Referenced by pism::ConfigJSON::set_flag_impl(), pism::ConfigJSON::set_number_impl(), pism::ConfigJSON::set_numbers_impl(), and pism::ConfigJSON::set_string_impl().