Skip to content

Commit 44c2410

Browse files
pac48shaur-k
authored andcommitted
A better JSON serialization for non-registered types
Signed-off-by: Paul Gesel <[email protected]>
1 parent 8bb73ee commit 44c2410

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/json_export.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ bool JsonExporter::toJson(const Any& any, nlohmann::json& dst) const
6565
}
6666
else
6767
{
68+
dst[kTypeField] = demangle(type);
69+
dst[kValueField] = any.empty() ? "no value set" : "no JSON converter registered";
6870
return false;
6971
}
7072
}

0 commit comments

Comments
 (0)