Y
Hacker News
new
|
ask
|
show
|
jobs
by
LeonM
2938 days ago
Absolutely, before you had to do some check like:
if(null === $data = json_decode($json)) throw new Exception();
1 comments
rollcat
2938 days ago
Wrong! "null" is a valid JSON-serialized value! You MUST call json_last_error.
Better yet - don't use PHP.
link
Better yet - don't use PHP.