Make Flickr shapes JSON parsable

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

The Flickr shapes available at 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.


November 2, 2011