Redesigned the writer (#36) and added YAML support based on the new writer (#23)

This commit is contained in:
Patrick Urbanke
2024-01-03 07:22:36 +01:00
parent 0a524a9893
commit 5c81e40f09
133 changed files with 3082 additions and 838 deletions
-8
View File
@@ -105,10 +105,6 @@ struct Reader {
rfl::Result<InputArrayType> to_array(
const InputVarType& _var) const noexcept {
// Necessary, because we write empty vectors as null.
if (_var.IsNull()) {
return flexbuffers::Vector::EmptyVector();
}
if (!_var.IsVector()) {
return rfl::Error("Could not cast to Vector.");
}
@@ -133,10 +129,6 @@ struct Reader {
rfl::Result<InputObjectType> to_object(
const InputVarType& _var) const noexcept {
// Necessary, because we write empty maps as null.
if (_var.IsNull()) {
return flexbuffers::Map::EmptyMap();
}
if (!_var.IsMap()) {
return rfl::Error("Could not cast to Map!");
}