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
@s-ludwig
Can we define a toRepresentation/fromRepresentation for a single field?
eg if I have a single (or a few) problematic field but the other ones should follow the default serialization/deserialization rules
ideally it'd work as an UDA:
struct Foo{
int normal1;
string normal2;
string fun1(){...}
auto fun2(string repr){...}
@toRepresentationCustom!fun1
@fromRepresentationCustom!fun2
byte[]bar;
}
The text was updated successfully, but these errors were encountered:
how about if we want to override to/from Bson conversion (instead of to/from string), eg to map DateTime to Bson's DateTime (but more generally than that example)?
what if I have little control over Foo (eg it is auto generated such as via dproto), how would define barString outside of Foo (again, in the single field case) ?
@s-ludwig
Can we define a
toRepresentation/fromRepresentation
for a single field?eg if I have a single (or a few) problematic field but the other ones should follow the default serialization/deserialization rules
ideally it'd work as an UDA:
The text was updated successfully, but these errors were encountered: