http://qs321.pair.com?node_id=1108347

Jeppe has asked for the wisdom of the Perl Monks concerning the following question:

Esteemed monks, I'm essentially trying to escape the contents of a JSON structure.
my $hashref = { abc => "abc'abc" };
This should become
{"abc":"abc\'abc"}
, and it must work for blessed references as well. I'm currently using the JSON module, but I'm not married to it. Ideally, this would have been resolved by a hook in the JSON module - but that does not seem to be available. What other options do I have?