couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [06/50] [abbrv] mochiweb commit: updated refs/heads/import-master to 3a54dbf
Date Wed, 12 Feb 2014 06:21:38 GMT
change integer handling in mochijson2 to fix JSON regression COUCHDB-118


git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@697512 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/e708a7a6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/e708a7a6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/e708a7a6

Branch: refs/heads/import-master
Commit: e708a7a63f21d9155169ae772c755d8c85a92cfe
Parents: 5efc9db
Author: John Christopher Anderson <jchris@apache.org>
Authored: Sun Sep 21 13:23:11 2008 +0000
Committer: John Christopher Anderson <jchris@apache.org>
Committed: Sun Sep 21 13:23:11 2008 +0000

----------------------------------------------------------------------
 mochijson2.erl | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/e708a7a6/mochijson2.erl
----------------------------------------------------------------------
diff --git a/mochijson2.erl b/mochijson2.erl
index 6fa7499..668486f 100644
--- a/mochijson2.erl
+++ b/mochijson2.erl
@@ -93,11 +93,8 @@ json_encode(false, _State) ->
     <<"false">>;
 json_encode(null, _State) ->
     <<"null">>;
-json_encode(I, _State) when is_integer(I) andalso I >= -2147483648 andalso I =< 2147483647
->
-    %% Anything outside of 32-bit integers should be encoded as a float
-    integer_to_list(I);
 json_encode(I, _State) when is_integer(I) ->
-    mochinum:digits(float(I));
+    integer_to_list(I);
 json_encode(F, _State) when is_float(F) ->
     mochinum:digits(F);
 json_encode(S, State) when is_binary(S); is_atom(S) ->


Mime
View raw message