JSON dencode error has occurred

api

#1

A few days ago.
JSON dencode error has occurred.
JSON data is received, but json_decode fails
Was the specification changed?

PHP code

$this->api    = "/lists/members.json";
...
$API->httpRequest($this->api, $this->params, 'GET');
$json   = $API->response->body;
$data = json_decode($json);

switch (json_last_error()) {
...
 case JSON_ERROR_SYNTAX:
  echo ' - Syntax error, malformed JSON'; // <- 
 break;
...
}

Regards.


#2

It’d help if you showed us the $json variable so we could see what was malformed about it.


#3

The problem was solved, but i can’t understand reason.

I tried to relply about JSON code. but, JSON code was so long.
so, I changed php code.
I added count parameters of lists/members

'count' => 1,

As a result, json_decode moved.

‘count’ => 5000 // move.
nothing // can’t move