Where did you get that huge JSON string?
According to the json_decode
documentation, if the json is malformed in some ways, it will just return NULL, which is what I'm getting when I try brother.php
// the following strings are valid JavaScript but not valid JSON
// the name and value must be enclosed in double quotes
// single quotes are not valid
$bad_json = "{ 'bar': 'baz' }";
json_decode($bad_json); // null
// the name must be enclosed in double quotes
$bad_json = '{ bar: "baz" }';
json_decode($bad_json); // null
// trailing commas are not allowed
$bad_json = '{ bar: "baz", }';
json_decode($bad_json); // null
EDIT
I ran both of your JSON files through JSONLint
, a JSON validator, and, as expected, the brother+a
file passed, while brother
was malformed in a few spots.