mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 11:53:48 +00:00
FIX: fix the json assert
jira: none Change-Id: I0d17ef2e8474e84397c92ecd7868c6313bb8c9f7 (cherry picked from commit ec2412ddec0fd9d21a004f231154bec28d3107f8)
This commit is contained in:
@@ -2974,7 +2974,8 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
|
|||||||
for (auto it = j_module.begin(); it != j_module.end(); it++) {
|
for (auto it = j_module.begin(); it != j_module.end(); it++) {
|
||||||
ModuleVersionInfo ver_info;
|
ModuleVersionInfo ver_info;
|
||||||
ver_info.name = (*it)["name"].get<std::string>();
|
ver_info.name = (*it)["name"].get<std::string>();
|
||||||
ver_info.product_name = wxString::FromUTF8((*it).value("product_name", json()).get<string>());
|
if ((*it).contains("product_name"))
|
||||||
|
ver_info.product_name = wxString::FromUTF8((*it)["product_name"].get<string>());
|
||||||
if ((*it).contains("sw_ver"))
|
if ((*it).contains("sw_ver"))
|
||||||
ver_info.sw_ver = (*it)["sw_ver"].get<std::string>();
|
ver_info.sw_ver = (*it)["sw_ver"].get<std::string>();
|
||||||
if ((*it).contains("sn"))
|
if ((*it).contains("sn"))
|
||||||
|
|||||||
Reference in New Issue
Block a user