Go to the source code of this file.
◆ ENUM_JSON_IO_DECL
#define ENUM_JSON_IO_DECL |
( |
|
ENUM | ) |
|
Value: jsonParser &
to_json(
const ENUM &val, jsonParser &json); \
\
void
from_json(ENUM &val,
const jsonParser &json);
CASM::jsonParser & to_json(const Eigen::MatrixBase< Derived > &value, CASM::jsonParser &json, CASM::jsonParser::as_flattest)
Write Eigen Matrix/Vector to JSON.
void from_json(Eigen::MatrixBase< Derived > &value, const CASM::jsonParser &json)
Read Eigen Matrix/Vector from JSON.
Definition at line 10 of file json_io.hh.
◆ ENUM_JSON_IO_DEF
#define ENUM_JSON_IO_DEF |
( |
|
ENUM | ) |
|
Value: jsonParser &
to_json(
const ENUM &val, jsonParser &json) { \
return
to_json(to_string<ENUM>(val), json); \
} \
\
void
from_json(ENUM &val,
const jsonParser &json) { \
val = from_string<ENUM>(json.get<std::string>()); \
}
Definition at line 15 of file json_io.hh.
◆ ENUM_JSON_IO_INLINE
#define ENUM_JSON_IO_INLINE |
( |
|
ENUM | ) |
|
Value: inline jsonParser &
to_json(
const ENUM &val, jsonParser &json) { \
return
to_json(to_string<ENUM>(val), json); \
} \
\
inline
void from_json(ENUM &val,
const jsonParser &json) { \
val = from_string<ENUM>(json.get<std::string>()); \
}
Definition at line 24 of file json_io.hh.