From 6747555bc736852f487487d670ca4b4bf521b6ea Mon Sep 17 00:00:00 2001 From: Harinath Nampally Date: Sun, 2 Feb 2025 21:57:02 -0500 Subject: [PATCH] address review comments Signed-off-by: Harinath Nampally --- ..._enum _strict.md => nlohmann_json_serialize_enum_strict.md} | 2 ++ .../docs/examples/nlohmann_json_deserialize_enum_strict.cpp | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) rename docs/mkdocs/docs/api/macros/{nlohmann_json_serialize_enum _strict.md => nlohmann_json_serialize_enum_strict.md} (95%) diff --git a/docs/mkdocs/docs/api/macros/nlohmann_json_serialize_enum _strict.md b/docs/mkdocs/docs/api/macros/nlohmann_json_serialize_enum_strict.md similarity index 95% rename from docs/mkdocs/docs/api/macros/nlohmann_json_serialize_enum _strict.md rename to docs/mkdocs/docs/api/macros/nlohmann_json_serialize_enum_strict.md index bbb5b63e4..3d026b3c9 100644 --- a/docs/mkdocs/docs/api/macros/nlohmann_json_serialize_enum _strict.md +++ b/docs/mkdocs/docs/api/macros/nlohmann_json_serialize_enum_strict.md @@ -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" ``` diff --git a/docs/mkdocs/docs/examples/nlohmann_json_deserialize_enum_strict.cpp b/docs/mkdocs/docs/examples/nlohmann_json_deserialize_enum_strict.cpp index bd93cf412..beb73e7e7 100644 --- a/docs/mkdocs/docs/examples/nlohmann_json_deserialize_enum_strict.cpp +++ b/docs/mkdocs/docs/examples/nlohmann_json_deserialize_enum_strict.cpp @@ -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();