adsabs / ADSImportPipeline

Data ingest pipeline for ADS classic->ADS+
GNU General Public License v3.0
1 stars 12 forks source link

Improperly escaped JSON in links_data #125

Closed aaccomazzi closed 7 years ago

aaccomazzi commented 7 years ago

The record for 2011ApJS..195...18R json structure for the links_data contains double quotes which break the syntax of the json.

romanchyla commented 7 years ago
"links_data":["{\"title\":\"\", \"type\":\"simbad\", \"instances\":\"21\", \"access\":\"\"}",
          "{\"title\":\"\", \"type\":\"pdf\", \"instances\":\"\", \"access\":\"open\"}",
          "{\"title\":\"\", \"type\":\"ned\", \"instances\":\"14\", \"access\":\"\"}",
          "{\"title\":\"MAST References (HST)\", \"type\":\"data\", \"instances\":\"\", \"access\":\"\"}",
          "{\"title\":\"\"Galaxy Halos, Outer disks, Substructure, Thick disks and Star clusters Survey (GHOSTS)\" (Roelof de Jong)\", \"type\":\"data\", \"instances\":\"\", \"access\":\"\"}",
          "{\"title\":\"European HST References (EHST)\", \"type\":\"data\", \"instances\":\"\", \"access\":\"\"}",
          "{\"title\":\"\", \"type\":\"electr\", \"instances\":\"\", \"access\":\"open\"}"]

BBB shows the data. Is this still a problem?

I came across it because the function that generates links_data replaces null (valid JSON object) with "" (empty string)

It is not clear to me if that is intentional. Is it?

aaccomazzi commented 7 years ago

This was properly fixed in this commit: https://github.com/adsabs/ADSimportpipeline/commit/8c56a524ce480c699ed5dc34cacfd05901590aa1

See changes in lines 407/427. Please merge all changes in the commit.