The php script loads html encoded into json from a third-party service, sometimes, for various reasons, the incomplete answer comes (slow connection) and json is not validated by standard php functions, for example json_decode. It is very important for the script to know what has come, even if this answer is not fully received. Advise how to get data from invalid json?
A simple example, the answer json should contain 25 links, but json loaded only 10, and broke off at 11, how to get these 10 links?
[ 'http://gogle.com', 'http://yandex.ru', 'http://bing'and further body is'.com', ...., ]'missing? - teran