Error loading Planet Mozilla feed

  • 1
  • Problem
  • Updated 8 years ago
The feed is http://planet.mozilla.org/atom.xml

The error appears to be caused by invalid JSON. According to JSONLint.com, this article has an invalid "story_title".

Let me know if you need anything else. Thanks!



[...]
{
"story_date": "2011-11-29 21:37:42",
"story_authors": "Smokey",
"short_parsed_date": "1:37pm",
"intelligence": {
"feed": 0,
"tags": 0,
"author": 0,
"title": 0
},
"read_status": 0,
"story_feed_id": 726397,
"story_permalink": "http://www.ardisson.org/afkar/2011/11/29/tetragram-for-advance/",
"story_title": "\U0001d319",
"long_parsed_date": "Today, November 29th 1:37pm",
"story_tags": [
"camino",
"life"
],
"story_content": [...],
"id": "http://www.ardisson.org/afkar/?p=773"
},
[...]
Photo of init2null

init2null

  • 6 Posts
  • 0 Reply Likes

Posted 8 years ago

  • 1
Photo of Martijn van der Ven

Martijn van der Ven

  • 34 Posts
  • 1 Reply Like
There are two possible problems with that story_title, I hope that me providing these will make it easier for Samuel to fix it, or at least save him some research.

1:
\U0001d319 is not a valid Unicode escape. A lowercase u must be used.

2:
In Javascript and JSON only 4 digits after \u will be parsed. This means only Unicode characters 0000 to FFFF (the Basic Multilingual Plane) are supported. The character that is used here falls far outside this and sits in the 10000 to 1FFFF range (the Supplementary Multilingual Plane). The correct escaping is: \uD834\uDF19.
This correct escaping seems to be the UTF-16 code points, a high and low surrogate that will be combined into a single character.
The Unicode converter by Richard Ishida will tell you more. You can check its source for the convertCharStr2jEsc function if you want to know how it is done.