Page MenuHomePhabricator

#get_web_data / #for_external_table don't work with JSON format (output from Special:Ask)
Closed, InvalidPublic

Description

Author: dan.bolser

Description:
I've put several examples here:
http://seqanswers.com/wiki/NeuroLex_test/q1

That wiki is using the latest trunk version of ED, but I was seeing similar behaviour with ED-1.3.2

If I'm doing it right, the examples show that:

  1. JSON format from a SMW-1.4.3 Special:Ask totally fails to be parsed by ED, while an identical query using CSV with header format is parsed correctly.
  1. JSON format from a SMW-1.7.1 alpha3 Special:Ask is parsed by ED into local variables, but is done so incorrectly, either at the #get_web_data or the #for_external_table stage.

Unfortunately the two different SMW instances don't have the same data, so I can't do a direct comparison, but all the JSON / CVS format data is available via the URLs for you to see what's going on.


Version: unspecified
Severity: normal

Details

Reference
bz34214

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:12 AM
bzimport set Reference to bz34214.

dan.bolser wrote:

Since you flagged this as low priority, I updated the documentation to indicate that JSON support is currently broken:

http://www.mediawiki.org/w/index.php?title=Extension:External_Data&stable=0&shownotice=1&fromsection=%2523get_web_data_-_CSV%252C_GFF%252C_JSON%252C_XML

For what it's worth, I didn't change the priority to "low" - Mark Hershberger did.

dan.bolser wrote:

Sorry if I edited the page prematurely, I just saw 'low' and thought that likely meant, 'wont fix for a while'.

I finally looked into this - sorry for the long delay. (Better late than never, I hope.) The first set of JSON is/was faulty - it looks like there was a bug in the JSON format with old versions of SMW. For the second set of JSON - I don't know if it was broken before, but now it's working fine - the only issue is that the underlines in the external variable names in the #get_web_data call need to be replaced with spaces.

I'm marking this as "invalid", although maybe it should be "fixed".