Make Flickr shapes JSON parsable November 2, 2011

Update: Flickr has released version 2.0.1 so this is no longer necessary. Thanks Flickr :D


The Flickr shapes available at http://code.flickr.com/blog/2011/01/08/flickr-shapefiles-public-dataset-2-0/ are not parsable with JSON.parse() because of a trailing comma before a closing curly brace. I was able to narrow the problem down to those trailing commas using the Json Parser Online tool. Then, I used RegexPal to create the ,(\s+}) regular expression to fix the syntax error.

I've created a python script that will will download the Flickr shapes archive (if it doesn't already exist in the working directory) and update the files to be JSON parsable. Now, those GeoJSON files can be read by libraries like Polymaps.

400: Invalid request