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
My question is... why should value field be a interface type?? I mean... every number can be converted to string without any problem... so, why can´t I use string as type and the json decoder makes responsible to realize the conversion (if it is necessary)??
I have been diving a little on the code of the decode file, and... in this line:
removing the second condition of the if (&& v.Type() == numberType) works for me. I guess it is a security statement or maybe something important that I don´t understand. But... when does v.Type() will be different than v.Kind()?? or... when does the v.Kind() will be a string and the v.Type() a json.Number??
This appears to be a question rather than a Go bug. We do not use the issue tracker for general discussions or questions like these. The Github bug tracker is only used for tracking bugs and proposals going through the Proposal Process.
Please feel free to reach out to the forums in the Questions wiki page; it has a list of good places for asking questions.