mora
mora copied to clipboard
Interger becomes double when updating document with mora.
I wrote a json like {"a":10} into mongodb with mora, but the integer 10 becomes a double number 10.00 after writing. How to wrote a integer?
In JSON, numbers are double by default.
I wonder if what you see is related to mora, mgo the driver or mongo.
Perhaps https://golang.org/pkg/encoding/json/#Decoder.UseNumber should be used.
It needs investigation