summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralabid <alabidan@gmail.com>2014-10-16 15:12:26 -0400
committeralabid <alabidan@gmail.com>2014-10-16 15:12:26 -0400
commitee1907c7f83307327689f1f60038cbc8ff0734eb (patch)
treedf9829fe3e1d1bc800f25408ebd24db08af299d9
parent5ebb82da508db80f3092941198503d185d36bf90 (diff)
downloadmongo-ee1907c7f83307327689f1f60038cbc8ff0734eb.tar.gz
don't format int32 with notation
Former-commit-id: 153136531fa2423787328eaf474e291b182380a2
-rw-r--r--common/json/json_format.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/common/json/json_format.go b/common/json/json_format.go
index 825d582e05a..90f7ad75778 100644
--- a/common/json/json_format.go
+++ b/common/json/json_format.go
@@ -65,8 +65,7 @@ func (_ MaxKey) MarshalJSON() ([]byte, error) {
}
func (n NumberInt) MarshalJSON() ([]byte, error) {
- data := fmt.Sprintf(`{ "$numberInt": "%v" }`, int32(n))
- return []byte(data), nil
+ return []byte(fmt.Sprintf("%d", int32(n))), nil
}
func (n NumberLong) MarshalJSON() ([]byte, error) {