in reply to Malformed JSON Error Piwigo
I think the problem area is:
It looks like the web server is trying to return a WARNING in the returned content.my $response = $ua->post( $conf{base_url}.'/ws.php?format=json', { method => 'pwg.categories.getImages', cat_id => $params{album_id}, per_page => 1000000, } ); foreach my $image_href (@{from_json($response->content)->{result}{ +images}}) { $photos_of_album{ $params{album_id} }{ $image_href->{file} } = + $image_href->{id}; }
I would probably place the blame on the server programmer, for not returning the error/warning in JSON format, as requested.
...Disinformation is not as good as datinformation. Don't document the program; program the document.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Malformed JSON Error Piwigo
by kiteboywales (Initiate) on Apr 26, 2017 at 17:48 UTC | |
by NetWallah (Canon) on Apr 26, 2017 at 21:37 UTC |