Page MenuHomePhabricator

Clean up core API data formats for new formatversion
Closed, ResolvedPublic

Description

Take advantage of the new ApiResult metadata to do the following:

  • Change booleans to actual booleans, instead of present-as-empty-string for true and absent for false.
  • Change {"key":{"*":"value"}} to {"key":"value"}
  • Change things that are really key-value pairs to kvp: [{"name":"key1","*":"value1"},{"name":"key2","*":"value2"}]{"key1":"value1","key2":"value2"}
    • Note this doesn't apply if there are more than two properties, although we might still change it to an assoc instead of an array in that case.
  • Change query's "pages" output to an 'BCarray' so it comes out as an array in the new format.
  • Resolve T12887 by setting META_TYPE='assoc' where needed.

Event Timeline

Anomie claimed this task.
Anomie raised the priority of this task from to Low.
Anomie updated the task description. (Show Details)
Anomie subscribed.
Anomie renamed this task from Clean up core API data formats for format=json2 to Clean up core API data formats for new formatversion.Jan 28 2015, 4:32 AM
Anomie updated the task description. (Show Details)
Anomie set Security to None.
gerritbot subscribed.

Change 191103 had a related patch set uploaded (by Anomie):
Change API result data structure to be cleaner in new formats

https://gerrit.wikimedia.org/r/191103

Patch-For-Review

I just merged @Anomie's patch that removes usage of deprecated ApiResult methods from Wikibase, see I847a4a5a1c9

Change 191103 merged by jenkins-bot:
Change API result data structure to be cleaner in new formats

https://gerrit.wikimedia.org/r/191103

Change 205714 had a related patch set uploaded (by Legoktm):
Change API result data structure to be cleaner in new formats

https://gerrit.wikimedia.org/r/205714

Change 205714 merged by jenkins-bot:
Change API result data structure to be cleaner in new formats

https://gerrit.wikimedia.org/r/205714