Closed xyoun closed 7 years ago
ffjson doesn't have the option to unmarshal numbers into a string like encoding/json
has.
I would suggest not using an interface{} but instead either use int64
if you know it's a number, string
if you're not sure so you can do the parsing yourself (this is exactly what encoding/json
does). Or just implement a custom type that implements its own UnmarshalJSON
function.
Output:
it seems that ffjson have no way to force unmarshal an interface to int64. but encoding/jjson can do it.