I have the feeling it improved greatly the memory consumption (on my linux it took previously ~10 GB of memory, to parse a 10 MB json file and I experienced some swapping hell with bigger files) but i still experience some crash on malformed json, if you put just a coma at the end of a correct value.
What perl version?
Mind your warnings? will not stay shared ... local our $i
Use more subroutines? ex
(?{ my $v = eval $^N; say $i x $l,"->have number $v" if TRACE_JSON; push_val($v); }) )
... </c>(?{ push_number( $^N, $depth ); }) sub push_number { ... TRACE( $depth, $msg );
Use more "Possessive quantifiers"? For example
(?>(?&STRING)) # ratchet \s*+ # ratchet [^\\"]++ # ratchet )*+ # ratchet (?: 0 | [1-9]\d*+ # ratchet
In reply to Re^3: strange behavior of JSON parsing guru regex
by Anonymous Monk
in thread strange behavior of JSON parsing guru regex
by seki
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |