API talk:Data formats

From MediaWiki.org
Jump to: navigation, search

Why does the json format have the pageid for the element name instead of a fix name like "page" along the lines of the other formats? This makes it exceedingly annoying to use data contracts and other automation to generate classes for manipulating the data.

JSONP[edit | edit source]

By any chance, will there be a JSONP version for the format available by default for all GET-related features (not using an extension or a third side website)? This will be so useful if you're collecting information from other related wikis or in a sub domain of your wiki.
87.68.162.236 18:02, 11 February 2014 (UTC)

If the format of the request is JSON, you can also add &callback=functionName to get the data as JSONP. There is some more information about it here. Deuterium (talk) 09:40, 19 April 2014 (UTC)

Compatibility[edit | edit source]

Does format=xml work in 1.8 as well? --Nemo 18:06, 25 June 2014 (UTC)