bawolff+wn at gmail
Feb 8, 2012, 3:01 PM
Post #8 of 11
> Message: 5
Proposed removal of some API output formats
[In reply to]
> Date: Wed, 8 Feb 2012 23:31:37 +0400
> From: Max Semenik <maxsem.wiki [at] gmail>
> To: MediaWiki API announcements & discussion
> † † † <mediawiki-api [at] lists>, † †Wikimedia developers
> † † † <wikitech-l [at] lists>
> Subject: [Wikitech-l] Proposed removal of some API output formats
> Message-ID: <568811305.20120208233137 [at] gmail>
> Content-Type: text/plain; charset=utf-8
> Hi, this idea had floated around for quite some time, but now that
> bug 34257 was added to the long list of problems, I would like to
> step up and start some progress. We propose to remove the following
> * WDDX - doesn't seem to be used by anyone. Doesn't look sane either.
> * YAML - we don't serve real YAML anyway, currently it's just a subset
> of JSON.
> * rawfm - was created for debugging the JSON formatter aeons ago, not
> useful for anything now.
> * txt, dbg, dump - the only reason they were added is that it was
> possible to add them, they don't serve the purpose of
> machine/machine communication.
> So, only 3 formats would remain:
> * JSON - *the* recommended API format
> * XML - evil and clumsy but sadly used too widely to be revoved in the
> foreseeable future
> * php - this one is used by several extensions and probably by some
> third-party reusers, so we won't remove it this time. However,
> any new uses of it should be discouraged.
> We plan to remove the aforementioned formats as soon as MediaWiki 1.19
> is branched so that these changes will take effect in 1.20, but would
> like to hear from you first if there are good reasons why we shouldn't
> do it or postpone it. Please have your say.
>  https://bugzilla.wikimedia.org/show_bug.cgi?id=34257
>  Me and Roan Kattouw, one of API's primary developers
>  https://www.mediawiki.org/wiki/API:Data_formats
> Best regards,
> Max Semenik ([[User:MaxSem]])
I have scripts that use the txt format. (Things that were originally
super hacky shell scripts, that became more permanently run scripts
[but still hacky beyond belief]). txt is mostly easy to process with
grep (So was the older version of yaml formatting). However, hopefully
not too many people were stupid enough to try to parse the api output
using grep. (In case anyone is wondering if using shell scripts to
access the api is really as bad as it sounds, I assure you its even
worse than you think).
If json becomes the new recommended format, does that mean that not
passing a format parameter would result in jsonfm instead of xmlfm?
(Probably not since the jsonfm pretty printer isn't all that pretty at
> For a stable API, that's far too fast of a deprecation path. We don't even
> remove core functions that fast (or shouldn't). I'd suggest throwing some
> kinds of warnings in the output for at least one release (1.20) and then
> target them for removal in 1.21.
Wikitech-l mailing list
Wikitech-l [at] lists