r03ert0 / brainspell

brainspell is a web platform to facilitate the creation of an open, human-curated, classification of the neuroimaging literature
10 stars 9 forks source link

JSON has quotes in it! #6

Closed vsoch closed 9 years ago

vsoch commented 9 years ago

Some silly author decided to have quotes in his abstract, and it's introducing an error into reading the json! For example this guy on line 4 (the abstract) gets all quotey:

"active" voxels

and so doing something like:

 import json
 import urllib2
 url = 'http://brainspell.org/json/pmid/19289173'
 text = urllib2.urlopen(url).read()
 myjson = json.loads(text)

results in an error! I tested escaping the quote, like this:

\"active\" voxels

and it works. Would it be possible to escape the quotes in the abstract text? I can do a workaround for the time being, because it's a rather small thing.

r03ert0 commented 9 years ago

fixed!