Can you use  callback=MyMethod  JSON call parameter?

Example:
http://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=namespaces&format=jsonfm&callback=MyFunction


On Tue, Apr 15, 2008 at 2:39 PM, Manos Batsis <manos_lists@geekologue.com> wrote:

Hello,

Since using the server proxy pattern is a no-go for me, the only easy
way (due to security constraints enforced by browsers) to obtain the
JSON string is through an (X)HTML script tag. When the tag loads the
JSON string, the browser evaluates it immediately and throws an "invalid
label" error.

This can be fixed if the JSON string is wrapped in parenthesis [1],
something i am unable to do since the script is evaluated by the browser
before i get access to it. So, I was wondering if you guys got any
workarounds, or whether a parameter can be added to the API. Maybe
format=jsonwrapped?

[1]
http://www.bennadel.com/blog/99-JSON-Minor-But-VERY-Important-Detail-Creating-Syntax-Error-Invalid-Label.htm

Manos

_______________________________________________
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api