On Tue Mar 30 04:37:57 2010, MAKAMAKA wrote:
Show quoted text> On 2009-7月-05 日 20:26:54, blue wrote:
> > for a large json string, it would be more efficient to pass a reference
> > to the string to avoid unnecessary copying. please allow either a scalar
> > or scalar ref for json strings.
>
> Sorry, I missed your report.
> what you want to do is this?
>
> decode_json( \$large_json_text );
>
> Currently I don't have a plan about the feature.
> But I think that a resource saving will be realized by incr_parse.
>
> Regards,
I was about to create a separate ticket for the same feature before I
found this ticket. It's more convenient to allow either a scalar or
scalar ref and it's a widely used pattern. See the results of this
google search:
http://google.com/search?q=site%3Asearch.cpan.org+allow+either+scalar+or+scalar+ref
Also, the incremental parser should also accept a scalar ref since it's
possible to feed a very large string to it.