https://bugzilla.wikimedia.org/show_bug.cgi?id=42888

       Web browser: ---
            Bug ID: 42888
           Summary: Some API queries uses asterisk as object key
           Product: MediaWiki
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: API
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---

For example
http://en.wikipedia.org/w/api.php?action=query&prop=revisions&format=jsonfm&rvprop=content&generator=random

Bug 21922 has another example

the * key of the revisions object makes it impossible to use the dot notation
to access its properties from Javascript, e.g. revisions.* -- one has to resort
to ["*"] instead.

This is not a big deal, of course, but using a different character would make
both access methods available. For example, $ or _ ( see
http://stackoverflow.com/questions/1661197/valid-characters-for-javascript-variable-names
) are valid variable names in javascript, and they would enable usage of
revisions.$ instead of revisions['*']

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to