Page MenuHomePhabricator

Empty lists are shown as null
Closed, ResolvedPublic

Description

Empty lists as output from many modules are shown as null rather than as an empty tag.

Reported at http://lists.wikimedia.org/pipermail/wikitech-l/2009-February/041534.html

Test case: http://en.wikipedia.org/w/api.php?action=query&list=recentchanges&rcend=0

Expected XML:

<api>

<query>
  <recentchanges />
</query>

</api>

Expected JSON:

{
"query": {

		"recentchanges": [
		]

}
}

Actual XML:

<api>

<query recentchanges="" />

</api>

Actual JSON:

{
"query": {

		"recentchanges": null

}
}


Version: 1.15.x
Severity: enhancement

Details

Reference
bz17552

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:31 PM
bzimport set Reference to bz17552.

My proposed fix in r47447 will be live shortly as a temporary fix, pending review by someone more knowledgeable.

(In reply to comment #1)

My proposed fix in r47447 will be live shortly as a temporary fix, pending
review by someone more knowledgeable.

Looks good to me.