PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800

◆ 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().