incubator-couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <...@apache.org>
Subject Re: svn commit: r697512 - /incubator/couchdb/trunk/src/mochiweb/mochijson2.erl
Date Sun, 21 Sep 2008 17:44:44 GMT

On Sep 21, 2008, at 15:23 , jchris@apache.org wrote:

> Author: jchris
> Date: Sun Sep 21 06:23:11 2008
> New Revision: 697512
>
> URL: http://svn.apache.org/viewvc?rev=697512&view=rev
> Log:
> change integer handling in mochijson2 to fix JSON regression  
> COUCHDB-118

Is this something that should be passed upstream?

Cheers
Jan
--
>
>
> Modified:
>    incubator/couchdb/trunk/src/mochiweb/mochijson2.erl
>
> Modified: incubator/couchdb/trunk/src/mochiweb/mochijson2.erl
> URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/src/mochiweb/mochijson2.erl?rev=697512&r1=697511&r2=697512&view=diff
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- incubator/couchdb/trunk/src/mochiweb/mochijson2.erl (original)
> +++ incubator/couchdb/trunk/src/mochiweb/mochijson2.erl Sun Sep 21  
> 06:23:11 2008
> @@ -93,11 +93,8 @@
>     <<"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