Defacto2/defacto2.net

Bug in JSON file

Closed this issue · 1 comments

PreScriptum: I discovered this GitHub page after posting the problem on your blog. Feel free to remove my comments there. Sorry ;)

Hello,

I noticed a few bugs in the JSON files (obtained through /file/data-json/*) which render them invalid and unusable:

  1. For some file, the date is incomplete (missing either year, month and/or day). For these files, the JSON is invalid because there is no value for the “year”, “month” and “day” properties which result, in the code, as this [code]"year": ,[/code]
  2. It’s missing a coma after the “demozoo” property. In the code, it looks like this [code]"demozoo":""
    "youtube":""[/code]
  3. Sometime there is a line break in the “platform” property and it breaks the JSON.
  4. Sometime “\” (slashes) are not correctly escaped which breaks the JSON.

Non-working examples:

  1. "demozoo” missing coma: http://www.defacto2.net/file/data-json/9b1c6
  2. missing “day” value: http://www.defacto2.net/file/data-json/9c26d6
  3. missing “month” value: http://www.defacto2.net/file/data-json/9e2ac9
  4. missing “year” value: http://www.defacto2.net/file/data-json/9f1a4
  5. “platform” line break problem: http://www.defacto2.net/file/data-json/a43986
  6. “\” escaping problem: (in the “artists” property) http://www.defacto2.net/file/data-json/ad2c8c

Tristan

Thanks .. I have fixed those errors and regenerated all the JSONs sitewide. If there are any more validation bugs please let me know.