I am using JLD2 to store some data in
struct format, it works great. However some of the objects need to change, as I need to add more members.
struct A n::Int a::String end
struct A n::Int a::String b::String end
when I read an old object with the new code it gives me this warning:
┌ Warning: saved type A is missing field b in workspace type; reconstructing └ @ JLD2 C:\.julia\packages\JLD2\k9Gt0\src\data\reconstructing_datatypes.jl:152
this is fine, the behavior is described here:
However I am not sure how the proposed type remapping with
typemap could help me: I would like to be able to load the old object in the new format but providing a default for eventual new properties.
I remember with JLD I was used to leverage on features like
JLD.translate, is there anything similar with JLD2?