See #268. Add include/mechanism_configuration/exporter.hpp.
Acceptance criteria
void write(const Mechanism&, const std::filesystem::path&) compiles
.yaml produces YAML; .json produces JSON; unknown suffix is an error
- Round-trip:
parse(path) then write(out) then parse(out) produces equal Mechanism
Ideas
- Unknown suffix must error; silent wrong-format output is worse than a clear error
- might have to do some tricks to emit json, but seems possible?
See #268. Add
include/mechanism_configuration/exporter.hpp.Acceptance criteria
void write(const Mechanism&, const std::filesystem::path&)compiles.yamlproduces YAML;.jsonproduces JSON; unknown suffix is an errorparse(path)thenwrite(out)thenparse(out)produces equalMechanismIdeas