I have a Mojolicious controller that calls
$controller->render_to_string(json => { %{$hashref} });
# or
$controller->render_to_string(json => $hashref);
The $hashref contains characters that are being escaped when written to the JSON object.
For example:
my $hashref = {
path => '/path/to/file'
}
Which are being output as:
{
"path": "\\/path\\/to\\/file"
}
Is there a way to inform the render_to_string() method not to interpolate/escape these values?
I should mention that the actual strings are MD5 hashes.