Generally I think the interface was provided to give a way to
save/load data that doesn't conform to the standard types given. It
also helps on types that compute data on load, like in their example.
func (x *CustomPropsExample) Load(c <-chan Property) error {
// Load I and J as usual.
if err := datastore.LoadStruct(x, c); err != nil {
return err
}
// Derive the Sum field.
x.Sum = x.I + x.J
return nil
}
I don't understand the use case from what you've provided and why you
wouldn't just make the json an embedded struct.
> --
> You received this message because you are subscribed to the Google Groups "google-appengine-go" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
google-appengin...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.