comparison VamPipePluginLibrary.cpp @ 2:4d6e60a7c80e

Some JSON fixes and a quick test program
author Chris Cannam
date Tue, 23 Aug 2016 12:04:49 +0100
parents 7cfe736fd974
children 6a792d8838c9
comparison
equal deleted inserted replaced
1:7cfe736fd974 2:4d6e60a7c80e
56 throw VampJson::Failure("object expected at top level"); 56 throw VampJson::Failure("object expected at top level");
57 } 57 }
58 if (!j["type"].is_string()) { 58 if (!j["type"].is_string()) {
59 throw VampJson::Failure("string expected for type field"); 59 throw VampJson::Failure("string expected for type field");
60 } 60 }
61 if (!j["content"].is_object()) { 61 if (!j["content"].is_null() && !j["content"].is_object()) {
62 throw VampJson::Failure("object expected for content field"); 62 throw VampJson::Failure("object expected for content field");
63 } 63 }
64 return j; 64 return j;
65 } 65 }
66 66