I have a struct
in go which contains a float64
field. However when I marshal the value of this field onto a json object it gives me a exponential number.
Based on my research on people with similar issues here, I understand that in json objects it will be number and in go it will be a float64, however I don't quite understand how to read the actual number and not a float64.
Here's a sample of my code.
http://play.golang.org/p/pR1B2oBKw2
It shows a string and a float64 both with the same values and all I want is the float64 to be dislpayed correctly on my json object. I have found similar questions on this forum but none of them seems to have a straight forward answer. They all seems to be workarounds to me and are related to unmarshaling an object and not the other way around.