--- JSON-XS/README 2007/03/29 02:45:49 1.9 +++ JSON-XS/README 2007/04/04 00:01:44 1.10 @@ -267,10 +267,10 @@ saving space. $json = $json->max_depth ([$maximum_nesting_depth]) - Sets the maximum nesting level (default 4096) accepted while - encoding or decoding. If the JSON text or Perl data structure has an - equal or higher nesting level then this limit, then the encoder and - decoder will stop and croak at that point. + Sets the maximum nesting level (default 512) accepted while encoding + or decoding. If the JSON text or Perl data structure has an equal or + higher nesting level then this limit, then the encoder and decoder + will stop and croak at that point. Nesting level is defined by number of hash- or arrayrefs that the encoder needs to traverse to reach a given point or the number of @@ -413,9 +413,6 @@ You can not currently output JSON booleans or force the type in other, less obscure, ways. Tell me if you need this capability. - circular data structures - Those will be encoded until memory or stackspace runs out. - COMPARISON As already mentioned, this module was created because none of the existing JSON modules could be made to work correctly. First I will @@ -563,8 +560,9 @@ Third, JSON::XS recurses using the C stack when decoding objects and arrays. The C stack is a limited resource: for instance, on my amd64 machine with 8MB of stack size I can decode around 180k nested arrays - but only 14k nested JSON objects. If that is exceeded, the program - crashes. Thats why the default nesting limit is set to 4096. If your + but only 14k nested JSON objects (due to perl itself recursing deeply on + croak to free the temporary). If that is exceeded, the program crashes. + to be conservative, the default nesting limit is set to 512. If your process has a smaller stack, you should adjust this setting accordingly with the "max_depth" method.