Mercurial > hg > piper-vamp-js
diff VamPipePluginLibrary.cpp @ 71:4f16ceb503c4
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 | caf75dce15e5 |
children | 6a792d8838c9 |
line wrap: on
line diff
--- a/VamPipePluginLibrary.cpp Tue Aug 23 11:17:01 2016 +0100 +++ b/VamPipePluginLibrary.cpp Tue Aug 23 12:04:49 2016 +0100 @@ -58,7 +58,7 @@ if (!j["type"].is_string()) { throw VampJson::Failure("string expected for type field"); } - if (!j["content"].is_object()) { + if (!j["content"].is_null() && !j["content"].is_object()) { throw VampJson::Failure("object expected for content field"); } return j;