I'm new to JSON so having some trouble parsing it.
I made a JSON file:
newjson.json
{ "title":"My Title", "contents":"My\ Multiline\ Contents" }
I used \ to avoid an error in JavaScript syntax that doesn't allow multiline strings, but when I load it with file_get_contents() and decode it using json_decode() in PHP, it can't parse it.
I think I should handle the \s with preg_replace, or something before I put the string in a decode function.
What should I do?