https://bugzilla.wikimedia.org/show_bug.cgi?id=67054
Bug ID: 67054 Summary: API mobileview "protection" sometimes returns object, sometimes returns empty array in JSON output Product: MobileFrontend Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General/Unknown Assignee: wikibugs-l@lists.wikimedia.org Reporter: br...@wikimedia.org CC: aricha...@wikimedia.org, jrob...@wikimedia.org, kw...@wikimedia.org, maxsem.w...@gmail.com, rkald...@wikimedia.org Web browser: --- Mobile Platform: --- A protected page returns an object/map/dictionary/associative array for the 'protection' property: http://en.wikipedia.org/w/api.php?action=mobileview&page=Barack_Obama&prop=protection|editable&format=json {"mobileview":{"sections":[],"protection":{"edit":["autoconfirmed"],"move":["sysop"]},"editable":false}} But an unprotected page seems to return an empty array instead of an object: http://en.wikipedia.org/w/api.php?action=mobileview&page=Katakana&prop=protection|editable&format=json {"mobileview":{"sections":[],"protection":[],"editable":true}} PHP may consider those the same type, but JSON/JavaScript, Java, Objective-C, etc consider them distinct types and we should be consistent in output to avoid surprises in the clients. -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l