how to Marshal a map of float64 type e.g ( map[float64] interface ) into json object ?
according to json.marshal() documentation map’s keys must be either string or integer i tried to marshal map[float64] string maps into json which gave me error of "type unsupported"
Thanks in advance
10 * n
n + n + n + n + n + n + n + n + n + n
stingify is a better option actually it is needed in my project to encode a map which is map[ float64 ][ ]data_structure
Thanks btw for your response
As I said, you shouldn’t do this.
Find another way to encode your data. If you keep the float you will regret that decission in the future.
ok i will look into other encoding and thanks for alarming me at the begging