Ladsgroup moved this task from Doing to Peer Review on the Wikidata-Campsite 
(Wikidata-Campsite-Iteration-∞) board.
Ladsgroup added a comment.


  This is one of the weirdest cases I've done. PHP doesn't distinguish between 
array and associative arrays when they are empty and there is no way to send 
this information around in php while in python they are completely different 
objects (lists and dictionaries). The reason that wbgetentity API module and 
the dumpers return {} instead of [] is because these containers are not passed 
around empty, they contain hidden elements that you can see when you change the 
formatting to xml (and for whatever reason, mediawiki needs to support xml 
output forever and beyond) but when they are turned to json, the hidden 
elements get stripped away but json knows it's a associative array.
  
  What I did was that I just told ResultBuilder for Special:EntityData to add 
metadata (while they get removed in final output anyway). That would fix the 
issue we are dealing now. It's behind a config variable.

TASK DETAIL
  https://phabricator.wikimedia.org/T138104

WORKBOARD
  https://phabricator.wikimedia.org/project/board/3539/

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Ladsgroup
Cc: gerritbot, Lea_Lacroix_WMDE, Addshore, NoInkling, hoo, 
Lucas_Werkmeister_WMDE, PokestarFan, Nikki, Ricordisamoa, Aklapper, Zppix, Tpt, 
CucyNoiD, Nandana, NebulousIris, Gaboe420, Versusxo, Majesticalreaper22, 
Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, 
Bsandipan, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, 
QZanden, LawExplorer, Lewizho99, Maathavan, _jensen, Jonas, Wikidata-bugs, 
aude, Lydia_Pintscher, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to