diff --git a/communication/utils/serialization.cpp b/communication/utils/serialization.cpp index 7058c799..885b97fd 100644 --- a/communication/utils/serialization.cpp +++ b/communication/utils/serialization.cpp @@ -765,7 +765,8 @@ void Metadata::Display(const char* indent) const { std::cout << document2string(metadata, indent) << std::endl; } void Metadata::_update_schema() { - if (metadata.HasMember("serializer") && + if (metadata.IsObject() && + metadata.HasMember("serializer") && metadata["serializer"].IsObject() && metadata["serializer"].HasMember("datatype") && metadata["serializer"]["datatype"].IsObject()) {