Skip to content
Snippets Groups Projects
Commit ca141b37 authored by Fabian Reister's avatar Fabian Reister
Browse files

read nullopt

parent b5c5be7a
No related branches found
No related tags found
No related merge requests found
......@@ -104,4 +104,17 @@ namespace armarx::aron::data::reader
{
i = input;
}
bool
NlohmannJSONReaderWithoutTypeCheck::readNull(InputType& input) // defaulted implementation
{
try
{
const std::string e = input;
return e == "nullopt";
}
catch (...)
{
return false;
}
}
} // namespace armarx::aron::data::reader
......@@ -69,5 +69,7 @@ namespace armarx::aron::data::reader
void readDouble(InputType& input, double& i, Path& p) override;
void readString(InputType& input, std::string& i, Path& p) override;
void readBool(InputType& input, bool& i, Path& p) override;
bool readNull(InputType& input) override;
};
} // namespace armarx::aron::data::reader
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment