Merge pull request #100 from Selmar/serialization_fixes

yet another serialization fix
This commit is contained in:
Syoyo Fujita 2018-10-11 01:25:12 +09:00 committed by GitHub
commit 3b25d9130a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4126,7 +4126,8 @@ static void SerializeExtensionMap(ExtensionMap &extensions, json &o) {
json ret;
if (ValueToJson(extIt->second, &ret)) {
extMap[extIt->first] = ret;
} else {
}
if(ret.is_null()) {
if (!(extIt->first.empty())) { // name should not be empty, but for sure
// create empty object so that an extension name is still included in json.
extMap[extIt->first] = json({});