You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is one of the best features of protocol buffers, allowing one to be forward and backward compatible with schema changes.
Eg:
struct Dataset{int age; int height;}
Dataset(13).pack.writeToFile("dataset.mpck");
// later on, Dataset is updated but we still want to use the saved data
struct Dataset{int age; string address = "bar";}
auto dataset="dataset.mpck".read.unpack!Dataset;
// currently, error: incompatible type
NOTE: error is actually uninformative, it should also show which fields are wrong
Allowing missing / extra fields seems good for me.
msgpack doesn't have a schema unlike protocol buffers, so
it seems to work with only tail fields.
I will try to implement it.
For reorder support, user should provide serialized data index to actual struct field index.
For such case, msgpack seems to not fit...
happy to discuss design of this
this is one of the best features of protocol buffers, allowing one to be forward and backward compatible with schema changes.
Eg:
struct Dataset{int height;int age; }
, possibly modulo an optionbool allow_reordered_fields
The text was updated successfully, but these errors were encountered: