Skip to content

Commit 6c88f35

Browse files
pac48dyackzan
authored andcommitted
A better JSON serialization for non-registered types
Signed-off-by: Paul Gesel <[email protected]>
1 parent 3abcf16 commit 6c88f35

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
@@ -49,6 +49,8 @@ bool JsonExporter::toJson(const Any& any, nlohmann::json& dst) const
4949
}
5050
else
5151
{
52+
dst[kTypeField] = demangle(type);
53+
dst[kValueField] = any.empty() ? "no value set" : "no JSON converter registered";
5254
return false;
5355
}
5456
}

0 commit comments

Comments
 (0)