in reply to Perl evals and JSON

with an eval structure, to determine whether the parameter string is a json structure or not

Sounds a bit sketchy, to say the least. Technically, how do you distinguish, for example, between a JSON structure and a comment that posts an example JSON structure.

I mean yes, you could do the automatic thing you're doing, but in my opinion you should have some design definitions that clearly state which parameters are expected to be JSON and which parameters are expected NOT to contain JSON. For example, is

{}

just a text or a very minimal JSON parameter? Without context, it really could be either. This can, under certain circumstances, create quite the security problem.

perl -e 'use Crypt::Digest::SHA256 qw[sha256_hex]; print substr(sha256_hex("the Answer To Life, The Universe And Everything"), 6, 2), "\n";'