JSON uses B to find out when some Perl scalar is a number looking at its internal representation, but this heuristic is very broken because Perl doesn't really differentiate between numbers and strings.
So, you could use a regular expression to check when something is a number of just handle everything as it were a string (no heuristic is going to give you the desired result in all the possible cases anyway).
In reply to Re: Non JSON.pm solution for JSON
by salva
in thread Non JSON.pm solution for JSON
by matija
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |