incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: json/couchdb integer min max values
Date Sun, 22 Mar 2009 22:16:34 GMT
IIRC, the JSON RFC either doesn't mention limits whatsoever or only
mentions that there is no limit.

A quick glance at mochijson2.erl which is CouchDB's JSON decoder looks
like its using list_to_integer for its conversion routine. The docs at
[1] on list_to_integer don't mention limits. I'm not at all certain,
but I think that erlang has builtin large number support so it may
Just Work &trade;. But tracking down any caveats on list_to_integer/1
should give you what you need.

HTH,
Paul Davis

[1] http://erlang.org/doc/man/erlang.html

On Sun, Mar 22, 2009 at 6:06 PM, Evan McLean <evan@michevan.id.au> wrote:
> Is it documented anywhere what the minimum and maximum values for an int
> are in couchdb and/or json?
>
> Based on a 32 bit integer?
>
> I had a quick scan through the json RFC and couldn't find anything.
>
> How would you go about efficiently handling very large numbers,
> especially if you wanted to use them in (sorted) keys?
>
> E.
>

Mime
View raw message