| 8 | using namespace EE::System; |
| 9 | |
| 10 | std::optional<int> parseOptionalInt( const json& value, const std::string_view& name ) { |
| 11 | if ( !value.contains( name ) || value[name].is_null() || value[name].empty() || |
| 12 | !value[name].is_number() ) { |
| 13 | return std::nullopt; |
| 14 | } |
| 15 | return value[name].get<int>(); |
| 16 | } |
| 17 | |
| 18 | std::optional<bool> parseOptionalBool( const json& value, const std::string_view& name ) { |
| 19 | if ( !value.contains( name ) || value[name].is_null() || value[name].empty() || |
no test coverage detected