- so.id = i["song"].as(so.id);
- so.title = i["song"].as(so.title);
- so.artist = i["song"].as(so.artist);
+ if (i["song"].is_null()) {
+ so.id = -1;
+ } else {
+ so.id = i["song"].as(so.id);
+ so.title = i["song"].as(so.title);
+ so.artist = i["song"].as(so.artist);
+ }