comparison vamp-json/VampJson.h @ 216:328ffacfc70e

Copyright -> rights
author Chris Cannam <cannam@all-day-breakfast.com>
date Fri, 10 Feb 2017 17:22:09 +0000
parents d2a32436bf09
children 02de5df3a884
comparison
equal deleted inserted replaced
215:8dff3213f77c 216:328ffacfc70e
541 541
542 json11::Json::object jo; 542 json11::Json::object jo;
543 jo["key"] = d.pluginKey; 543 jo["key"] = d.pluginKey;
544 jo["basic"] = fromBasicDescriptor(d.basic); 544 jo["basic"] = fromBasicDescriptor(d.basic);
545 jo["maker"] = d.maker; 545 jo["maker"] = d.maker;
546 jo["copyright"] = d.copyright; 546 jo["rights"] = d.copyright;
547 jo["version"] = d.pluginVersion; 547 jo["version"] = d.pluginVersion;
548 548
549 json11::Json::array cat; 549 json11::Json::array cat;
550 for (const std::string &c: d.category) cat.push_back(c); 550 for (const std::string &c: d.category) cat.push_back(c);
551 jo["category"] = cat; 551 jo["category"] = cat;
592 } else if (!j["maker"].is_null() && 592 } else if (!j["maker"].is_null() &&
593 !j["maker"].is_string()) { 593 !j["maker"].is_string()) {
594 594
595 err = "string expected for maker"; 595 err = "string expected for maker";
596 596
597 } else if (!j["copyright"].is_null() && 597 } else if (!j["rights"].is_null() &&
598 !j["copyright"].is_string()) { 598 !j["rights"].is_string()) {
599 err = "string expected for copyright"; 599 err = "string expected for rights";
600 600
601 } else if (!j["category"].is_null() && 601 } else if (!j["category"].is_null() &&
602 !j["category"].is_array()) { 602 !j["category"].is_array()) {
603 603
604 err = "array expected for category"; 604 err = "array expected for category";
631 631
632 toBasicDescriptor(j["basic"], psd.basic, err); 632 toBasicDescriptor(j["basic"], psd.basic, err);
633 if (failed(err)) return {}; 633 if (failed(err)) return {};
634 634
635 psd.maker = j["maker"].string_value(); 635 psd.maker = j["maker"].string_value();
636 psd.copyright = j["copyright"].string_value(); 636 psd.copyright = j["rights"].string_value();
637 psd.pluginVersion = j["version"].int_value(); 637 psd.pluginVersion = j["version"].int_value();
638 638
639 for (const auto &c : j["category"].array_items()) { 639 for (const auto &c : j["category"].array_items()) {
640 if (!c.is_string()) { 640 if (!c.is_string()) {
641 err = "strings expected in category array"; 641 err = "strings expected in category array";