Thanks to your patch.
Sorry, the patch is not scheduled to be applied under the present
situation because of complexity of processing and JSON format.
However, the function might be achieved by some methods(below) in the
future version.
alternatives:
{
local $^W = undef;
my %esc = (
"\n" => '\n',
"\r" => '\r',
"\t" => '\t',
"\f" => '\f',
"\b" => '\b',
"'" => '\\\'',
"\\" => '\\\\',
);
local *JSON::Converter::_stringfy = sub {
my $arg = shift;
$arg =~ s/([\\\n'\r\t\f\b])/$esc{$1}/eg;
$arg =~ s/([\x00-\x07\x0b\x0e-\x1f])/'\\u00' . unpack('H2',$1)/eg;
return "'" . $arg ."'";
};
$js = objToJson($obj);
print $js, "\n";
}