Manos Batsis schreef: > 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? > > Why don't you use a callback? format=json&callback=foo will return foo(/* stuff here */) (i.e. wrap it in a function call).
Roan Kattouw (Catrope) _______________________________________________ Mediawiki-api mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
