address review comments

Signed-off-by: Harinath Nampally <harinath922@gmail.com>
This commit is contained in:
Harinath Nampally 2025-02-02 21:57:02 -05:00
parent 5f7d41c0a4
commit 6747555bc7
2 changed files with 3 additions and 2 deletions

View File

@ -58,6 +58,7 @@ inline void from_json(const BasicJsonType& j, type& e);
Expected output:
```
--8<-- "examples/nlohmann_json_serialize_enum_strict.output"
[json.exception.type_error.302] serialization failed: enum value 3 is out of range
```
@ -72,6 +73,7 @@ inline void from_json(const BasicJsonType& j, type& e);
Expected output:
```
--8<-- "examples/nlohmann_json_deserialize_enum_strict.output"
[json.exception.type_error.302] deserialization failed: invalid JSON value "yellow"
```

View File

@ -20,9 +20,8 @@ NLOHMANN_JSON_SERIALIZE_ENUM_STRICT(Color,
int main()
{
// deserialization
json j_yellow = "yellow";
// deserialization
try
{
auto yellow = j_yellow.template get<ns::Color>();