Skip to content

Commit 79e09ed

Browse files
committed
A better JSON serialization for non-registered types
Signed-off-by: Paul Gesel <[email protected]>
1 parent c06e058 commit 79e09ed

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)