Working with optional attributes in JSON is quite inconvenient to write: Stream stream = { appId : js["appId"].str, // like this appVersion : js.object.get("appVersion", JSONValue("")).str, // or that startTimestamp : ("startTimestamp" in js is null) ? "" : js["startTimestamp"].str, }; Adding opt* methods like optStr(string key, defaultValue = string.init) would make the usage a lot more readable: Stream stream = { appId : js["appId"].str, appVersion : js.optStr("appVersion", "1.0"), startTimestamp : js.optStr("startTimestamp") };
std.json (and most of Phobos is maintainance-only). The planned next version of std.data.json is here: https://github.com/dlang-community/std_data_json
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10399 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB