note 87756 deleted from function.json-decode by thiago
| From: | thiago@php.net | Date: | Fri, 19 Dec 2008 18:51:26 +0000 |
| Subject: | note 87756 deleted from function.json-decode by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-148356@lists.php.net to get a copy of this message | ||
Note Submitter: rot13(z2s2 at yvoreb dot vg)
----
So sadly true, soapergem at gmail dot com.
Firefox 3.0.5 saves bookmarks in an incorrect JSON format (although 3.0.4 was just fine).
Thanks to bizarr3_2006 at yahoo dot com, I discovered that an extra comma was the culprit.
For those interested, in order to parse the file you should do:
$contents=file_get_contents($filename);
$contents=str_replace(",]","]",$contents);
$bookmarks=json_decode(utf8_encode($contents),true);
Mauro