Last modified: 2009-04-28 11:44:35 UTC
The error warning currently adds an additional 74k (15k gzipped) of text to a query in the form of the help page. I often code for streamlineyness and quickness especially in javascript run client-side on page loads, and when I get an error I usually only care about the error itself, and the text of the error is ignored. Could a parameter be created to suppress the showing of help on error? Or possibly this could be default behavior for format=json/jsonfm and some other esoteric situations where the error is not even human readable, as in the example.
(In reply to comment #0) > The error warning currently adds an additional 74k (15k gzipped) of text to a > query in the form of the help page. This only happens when using an *fm format. Formats like json (not jsonfm) don't show the help page unless you specifically asked for it through action=help. Assuming your JavaScript application uses format=json rather than jsonfm, you won't have this problem.
Reopening and retitling. http://en.wikipedia.org/w/api.php?action=flibble&format=xml <-- useful error http://en.wikipedia.org/w/api.php?action=flibble&format=xmlfm <-- useful help http://en.wikipedia.org/w/api.php?action=flibble&format=json <-- useful error http://en.wikipedia.org/w/api.php?action=flibble&format=jsonfm <-- this help is useless Per IRC: json can convert /\n/ to something like "\"\n\t + \"" foo = "foo bar baz" + "foo bar baz" This then would actually be legible in jsonfm, and still valid after copy/paste
(In reply to comment #2) > Per IRC: json can convert /\n/ to something like "\"\n\t + \"" > > foo = "foo bar baz" > + "foo bar baz" > > This then would actually be legible in jsonfm, and still valid after copy/paste But it wouldn't be valid json text according to RFC 4627, if that matters to you.
(In reply to comment #3) > But it wouldn't be valid json text according to RFC 4627, if that matters to > you. > You're right: RFC 4627 does not allow breaking up JSON strings in any way. Marking as WONTFIX for this reason.
But the help doesn't exist in format=json, this is jsonfm. Why not just remove the help from jsonfm then? it seems quite useless.
(In reply to comment #5) > But the help doesn't exist in format=json, this is jsonfm. > > Why not just remove the help from jsonfm then? it seems quite useless. > Removed in r50000
Thank you(In reply to comment #6) > (In reply to comment #5) > > But the help doesn't exist in format=json, this is jsonfm. > > > > Why not just remove the help from jsonfm then? it seems quite useless. > > > Removed in r50000 > Yay! My hero ^_^