google / jsonapi

jsonapi.org style payload serializer and deserializer
http://godoc.org/github.com/google/jsonapi
MIT License
1.42k stars 211 forks source link

got the wrong id when unmarshel a stract with an Int64 id #190

Open LatrecheYasser opened 4 years ago

LatrecheYasser commented 4 years ago

i get a wrong id when Unmarshal json object to a struct with id of int64, in general this id is the true id in the db - 1 !! for now i think the problem is with a conversion somewhere there, when the lib converts the string id from the json object to an int64 id !!! but i'm not sure. is there any solution for this (any other solution without changing the type of the id into a string). ?

aren55555 commented 4 years ago

Are you able to provide example go code for this?