comparison json/VampJson.h @ 59:77833938f0f8

Tidy
author Chris Cannam <c.cannam@qmul.ac.uk>
date Mon, 19 Sep 2016 15:52:38 +0100
parents 7aec704705c7
children 8a4bcb3dc3a6 85ec33975434
comparison
equal deleted inserted replaced
58:c38e12d4bbdd 59:77833938f0f8
924 jo["type"] = "list"; 924 jo["type"] = "list";
925 return json11::Json(jo); 925 return json11::Json(jo);
926 } 926 }
927 927
928 static json11::Json 928 static json11::Json
929 fromVampResponse_List(std::string errorText, 929 fromVampResponse_List(const Vamp::HostExt::ListResponse &resp) {
930 const Vamp::HostExt::ListResponse &resp) {
931 930
932 json11::Json::object jo; 931 json11::Json::object jo;
933 jo["type"] = "list"; 932 jo["type"] = "list";
934 jo["success"] = (errorText == ""); 933 jo["success"] = true;
935 jo["errorText"] = errorText;
936 934
937 json11::Json::array arr; 935 json11::Json::array arr;
938 for (const auto &a: resp.pluginData) { 936 for (const auto &a: resp.pluginData) {
939 arr.push_back(fromPluginStaticData(a)); 937 arr.push_back(fromPluginStaticData(a));
940 } 938 }