What is wrong with this JSON string in PHP?
[{"Type":"Chasse|Loisirs","Productions":"Bois d\'Œuvre|Bois de chauffage","Essences principales > Feuillus":"Bouleaux|Hêtres|Merisiers|Peupliers"}]
I try online tools validators like this one, and JSON seems valid, but with PHP I still have an error:
$result = json_decode($json)
// JSON_ERROR_SYNTAX
I try remove UTF-8 BOM, stripslashes, htmlentities... without success.
Why this JSON is malformed, and how to make it OK?
\'is not valid JSON.\'is not valid JSON.', so the\'is handled by PHP and just a'ends up in the JSON. But JSON with an actual\'sequence in a string is not valid.