<?php $json = '{"foo": "lorem `bar` ipsum"}'; echo 'Without str_replace()' . PHP_EOL; var_dump(json_decode($json, true)); echo PHP_EOL; echo 'With your current str_replace()' . PHP_EOL; var_dump(json_decode(str_replace('`', '"', $json), true)); echo PHP_EOL; echo 'With esceped str_replace()' . PHP_EOL; var_dump(json_decode(str_replace('`', '\"', $json), true));
You have javascript disabled. You will not be able to edit any code.