comparison utilities/vampipe-convert.cpp @ 42:91f5c92d3bf7

Some JSON fixes and a quick test program
author Chris Cannam <c.cannam@qmul.ac.uk>
date Tue, 23 Aug 2016 12:04:49 +0100
parents 0b48b10140bb
children a98ef4c2616b
comparison
equal deleted inserted replaced
41:10ac36b7198a 42:91f5c92d3bf7
45 throw VampJson::Failure("object expected at top level"); 45 throw VampJson::Failure("object expected at top level");
46 } 46 }
47 if (!j["type"].is_string()) { 47 if (!j["type"].is_string()) {
48 throw VampJson::Failure("string expected for type field"); 48 throw VampJson::Failure("string expected for type field");
49 } 49 }
50 if (!j["content"].is_object()) { 50 if (!j["content"].is_null() && !j["content"].is_object()) {
51 throw VampJson::Failure("object expected for content field"); 51 throw VampJson::Failure("object expected for content field");
52 } 52 }
53 return j; 53 return j;
54 } 54 }
55 55