Closed msrocka closed 2 years ago
When opening a project with a report file, the report file is deserialized in the following way:
report = new Gson().fromJson(buffer, Report.class);
This crashes with older reports as the report format has changed. An example where this happens is the bottles case study on openLCA Nexus.
To fix that it would be good to read reports in a backwards-compatible way based on the JSON elements of the report document, e.g. implementing a fromJson function for the report elements like here: https://github.com/GreenDelta/olca-app/blob/master/olca-app/src/org/openlca/app/tools/openepd/model/Ec3Epd.java#L37
fromJson
When opening a project with a report file, the report file is deserialized in the following way:
This crashes with older reports as the report format has changed. An example where this happens is the bottles case study on openLCA Nexus.
To fix that it would be good to read reports in a backwards-compatible way based on the JSON elements of the report document, e.g. implementing a
fromJson
function for the report elements like here: https://github.com/GreenDelta/olca-app/blob/master/olca-app/src/org/openlca/app/tools/openepd/model/Ec3Epd.java#L37