Last modified: 2011-07-18 13:02:37 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 T31939, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29939 - Geographic coordinates don't serialize to valid JSON
Geographic coordinates don't serialize to valid JSON
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticMaps (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Jeroen De Dauw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-18 09:26 UTC by stephan.tittel
Modified: 2011-07-18 13:02 UTC (History)
0 users

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


Attachments

Description stephan.tittel 2011-07-18 09:26:48 UTC
When querying SMW using semantic search with JSON export result format, geographic coordinates break the validity of the result. The reason for this is that the "seconds" symbol (") does not get escaped, unintentionally terminating the JSON string for the coordinate.

I am using: SM Version 0.7.6.1 and SMW Version 1.5.6

Example query result breaking JSON validity:
<pre>
{
	"properties": {
		"has_coordinates" : { "valueType": "text" }
	},
	"items": [
		{
			"label": "File:1306499229166.jpeg",
			"has_coordinates": "49° 52' 28" N, 8° 39' 35" E",
			"uri" : "http://mywiki/index.php?title=File:1306499229166.jpeg",
			"type" : "Media"
		}
        ]
}
</pre>
Comment 1 Jeroen De Dauw 2011-07-18 12:30:23 UTC
Thanks for reporting this, I fixed it in r92426 :)

Now results will look like:

{
	"label": "Berlin",
	"has_coordinates": {"lat":52.5234051,"lon":13.4113999}
},
Comment 2 stephan.tittel 2011-07-18 13:02:37 UTC
(In reply to comment #1)
> Thanks for reporting this, I fixed it in r92426 :)
> 
> Now results will look like:
> 
> {
>     "label": "Berlin",
>     "has_coordinates": {"lat":52.5234051,"lon":13.4113999}
> },

perfect, thanks!

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


Navigation
Links