mora icon indicating copy to clipboard operation
mora copied to clipboard

Interger becomes double when updating document with mora.

Open nifflin opened this issue 9 years ago • 1 comments

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?

nifflin avatar Feb 03 '16 01:02 nifflin

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

emicklei avatar Feb 03 '16 20:02 emicklei