--- deliantra/server/lib/cf.pm 2007/06/25 05:43:45 1.287 +++ deliantra/server/lib/cf.pm 2007/06/25 07:40:53 1.288 @@ -22,6 +22,7 @@ use Coro::AIO; use Coro::Storable; +use JSON::XS 1.4 (); use BDB (); use Data::Dumper; use Digest::MD5; @@ -239,8 +240,6 @@ } || "[unable to dump $_[0]: '$@']"; } -use JSON::XS (); - =item $ref = cf::from_json $json Converts a JSON string into the corresponding perl data structure. @@ -251,7 +250,7 @@ =cut -our $json_coder = JSON::XS->new->convert_blessed->utf8; +our $json_coder = JSON::XS->new->convert_blessed->utf8->max_size (1e6); # accept ~1mb max sub to_json ($) { $json_coder->encode ($_[0]) } sub from_json ($) { $json_coder->decode ($_[0]) }