The first solution is broken; it suffers from JSON-injection bugs. For example, try
my $name = 'Mike "The Coder" Smith';
or
my $pass = 'S3KYU\\3e';
In reply to Re^2: strings to json
by ikegami
in thread strings to json
by bigup401
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |