couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r957975 - /couchdb/branches/0.11.x/src/mochiweb/mochijson2.erl
Date Fri, 25 Jun 2010 14:21:56 GMT
Author: jan
Date: Fri Jun 25 14:21:56 2010
New Revision: 957975

URL: http://svn.apache.org/viewvc?rev=957975&view=rev
Log:
Merge r957656 from trunk:

patch mochijson2 to allow output of big integers not in float form (it stores them just fine)

Modified:
    couchdb/branches/0.11.x/src/mochiweb/mochijson2.erl

Modified: couchdb/branches/0.11.x/src/mochiweb/mochijson2.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/0.11.x/src/mochiweb/mochijson2.erl?rev=957975&r1=957974&r2=957975&view=diff
==============================================================================
--- couchdb/branches/0.11.x/src/mochiweb/mochijson2.erl (original)
+++ couchdb/branches/0.11.x/src/mochiweb/mochijson2.erl Fri Jun 25 14:21:56 2010
@@ -98,11 +98,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