![]() |
Shamrock 2025.10.0
Astrophysical Code
|
#include "shamcomm/logs.hpp"#include "shamcomm/worldInfo.hpp"#include "shamrock/io/json_print_diff.hpp"
Include dependency graph for json_utils.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Namespaces | |
| namespace | shamrock |
| namespace for the main framework | |
Macros | |
| #define | SHAMROCK_JSON_SERIALIZE_ENUM(ENUM_TYPE, ...) |
| Macro to serialize/deserialize an enum to/from a JSON object modified from the NLOHMANN_JSON_SERIALIZE_ENUM macro, throw an exception if the enum value is invalid and do not use the first case by default. | |
Functions | |
| std::string | shamrock::log_json_changes (const nlohmann::json &j_current, const nlohmann::json &j, bool has_used_defaults, bool has_updated_config) |
| Shown the changes between two JSON objects to log config changes. | |
| template<class T > | |
| void | shamrock::get_to_if_contains (const nlohmann::json &j, const std::string &key, T &value, bool &has_used_defaults) |
| template<class T > | |
| void | shamrock::get_to_if_contains_fallbacks (const nlohmann::json &j, const std::string &key, T &value, std::initializer_list< const char * > fallbacks, bool &has_used_defaults, bool &has_updated_config) |
Definition in file json_utils.hpp.
| #define SHAMROCK_JSON_SERIALIZE_ENUM | ( | ENUM_TYPE, | |
| ... | |||
| ) |
Macro to serialize/deserialize an enum to/from a JSON object modified from the NLOHMANN_JSON_SERIALIZE_ENUM macro, throw an exception if the enum value is invalid and do not use the first case by default.
| ENUM_TYPE | The enum type to serialize/deserialize. |
| ... | The pairs of enum values and their JSON representations. |
Definition at line 86 of file json_utils.hpp.