Last modified: 2010-03-03 14:45:14 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T22241, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 20241 - SMW_QP_JSONlink.php throwing errors and not creating valid JSON
SMW_QP_JSONlink.php throwing errors and not creating valid JSON
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Fabian Howahl
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-14 15:50 UTC by Neil Davies
Modified: 2010-03-03 14:45 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Fixes bug (4.54 KB, patch)
2009-08-14 15:50 UTC, Neil Davies
Details

Description Neil Davies 2009-08-14 15:50:50 UTC
Created attachment 6460 [details]
Fixes bug

JSON query result renderer under certain circumstances fails and always produces invalid JSON
Its invalid as the keys are not always enclosed within quotes
If the query is for a specific page and is requesting values of that page then it generates an error

Patch that fixes these issues is attached
Comment 1 Markus Krötzsch 2009-08-14 16:05:04 UTC
See also my comment on the devel list regarding the problems with valid JSON: 

http://sourceforge.net/mailarchive/message.php?msg_name=200908141759.41407.markus%40semantic-mediawiki.org

Reassigning to Fabian for check.
Comment 2 Fabian Howahl 2009-08-24 17:36:17 UTC
It is about time that the JSON exporter delivers valid JSON.
The patch can be applied without affecting the compatibility with Exhibit now.
Comment 3 Daniel Friesen 2009-08-24 17:39:59 UTC
Rather than patching the code to construct json in a raw string based way, which most likely will have issues when it comes to unicode (normally those are supposed to be encoded using \u's iirc) why not tweak the code instead to use a proper json encoder. The API already has a method for json encoding.
Comment 4 Fabian Howahl 2009-08-24 17:50:44 UTC
Indeed the use of existing JSON encoding functions is feasible now. I am going to modify the code accordingly as soon as I find time.
Comment 5 Markus Krötzsch 2010-01-11 16:45:43 UTC
This change could now be applied, but the respective code has changed and the patch no longer matches. It would be helpful if a patch for the current version could be supplied.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links