[php-src] Issue #14177: Add "JSON_TOLERANT" flag to json_decode
| From: | rudolphi | Date: | Wed, 08 May 2024 11:17:15 +0000 |
| Subject: | [php-src] Issue #14177: Add "JSON_TOLERANT" flag to json_decode | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-246878@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/14177
Author: rudolphi
### Description
PHP's json_decode is unable to parse JSON data like from
https://www.caymanchem.com/solr/cchProduct/select?qf=catalogNum%5E2000%20exactname%5E5000%20exactSynonyms%5E4000%20edgename%5E4000%20synonymsPlain%5E2000%20formalNameDelimited%5E1500%20vendorItemNumber%5E4000%20casNumber%5E10000%20name%5E1500%20ngram_name%5E1000%20delimited_name%5E1500%20tagline%5E0.01%20keyInformation%5E0.01%20keywords%5E200%20inchi%5E20000%20inchiKey%5E20000%20smiles%5E20000%20ngram_synonym%5E400%20ngram_general%5E0.01&rows=100&defType=edismax&q.op=AND&enableElevation=true&facet=true&facet.field=newProduct&facet.field=raptas&facet.limit=100000&facet.mincount=1&wt=json&&start=0&bust=uhrdtm2owmh&version=2.2&q=phenyl&qf=
Older PHP versions were more tolerant, to the current implementation is too strict and therefore
practically useless. Unlike in other programming languages, there is not even an alternative library
that can be used to overcome such problem.