There appears to be an oddity with json_encode and/or json_decode when attempting decode a string that was produced by json_encode:
$object = new stdClas
Please use the PHP native function stripslashes
stripslashes
https://www.php.net/manual/en/function.stripslashes.php