Reputation:
The following JSON response returns null
using json_decode()
Any ideas why it is invalid, and how can I make it valid to decode.
Upvotes: 0
Views: 841
Reputation: 6555
Look at http://jsonlint.com/
Accoring to JSONLint, you have the following error:
Parse error on line 82:
... "text": "Make it easier for
-----------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['
The error is with this in the string '\x27s'
The same again for line 92.
"Roger\x27scompanion\x3cem\x3ehelped\x3c/em\x3ehimwiththeren"
Replace them with their appropriate unicode characters or add an extra slash as one slash is escaping your string.
Upvotes: 1
Reputation: 60
from PHP.net:
NULL is returned if the json cannot be decoded or if the encoded data is deeper than the recursion limit.
perhaps that is the issue?
Upvotes: 0