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
Hi,
Am trying to store a struct into datastore like below,
type Config struct {
Id int64 datastore:"id,noindex" goon:"id" json:"id"
Config map[string]float64 datastore:"config,noindex" json:"config,omitempty"
}
I have also impl PropertyLoaderSaver interface to convert the map into json string before saving to datastore, everything work fine with datastore, while fetching the json string is convert to back to map,
But when this entity is fetched from memcache am getting following error from goon.go file,
goon - goon.go:475 - goon: Failed to decode field config - extra data in buffer
Any help on how to fix this issue?
Note: Every First time fetch from datastore it works fine, only subsequent fetch (while it fetch from memcache) its throwing this error
The text was updated successfully, but these errors were encountered:
Unfortunately PropertyLoadSaver isn't fully supported yet. You may be in luck soon though, as there is a PR for supporting it (#69). My current plan is to review that PR this weekend.
(I'm not 100% sure if that PR will make your code work, I hope it will, but I'm 100% sure that the current goon version doesn't support PropertyLoadSaver)
PS. Completely unrelated to your issue, but you don't need to store the Id property in the datastore like that, it's already part of the key.
Hi,
Am trying to store a struct into datastore like below,
type Config struct {
Id int64
datastore:"id,noindex" goon:"id" json:"id"
Config map[string]float64
datastore:"config,noindex" json:"config,omitempty"
}
I have also impl PropertyLoaderSaver interface to convert the map into json string before saving to datastore, everything work fine with datastore, while fetching the json string is convert to back to map,
But when this entity is fetched from memcache am getting following error from goon.go file,
goon - goon.go:475 - goon: Failed to decode field config - extra data in buffer
Any help on how to fix this issue?
Note: Every First time fetch from datastore it works fine, only subsequent fetch (while it fetch from memcache) its throwing this error
The text was updated successfully, but these errors were encountered: