Following T138104 empty "containers" in the JSON representation of entity data (e.g. returned by wbgetentities API) should be empty JSON objects, not empty JSON array (i.e. {} not []}.
It seems statements in forms be still represented as empty JSON arrays in place of empty JSON objects.
For instance, https://www.wikidata.org/w/api.php?action=wbgetentities&format=json&ids=L3872 returns "claims":[] in the serialization of L3872-F2.
{ "entities": { "L3872": { (...) "claims": {}, "forms": [ { "id": "L3872-F1", (...) "claims": [] }, { "id": "L3872-F2", (...) "claims": [] } ], "senses": [ (...) ] } }, "success": 1 }
Expected state (acceptance criterion):
- if the lexeme form or sense has not statements stored, the JSON representation of its data should contain claims: {} entry, not claims: [].
Notes:
- The patches fixing this issue should already be done by @Lucas_Werkmeister_WMDE and now only need review:
- https://gerrit.wikimedia.org/r/677353 (WikibaseLexeme, disabling a test)
- https://gerrit.wikimedia.org/r/676820 (Wikibase, fixing the thing)
- https://gerrit.wikimedia.org/r/677353 (WikibaseLexeme, reenabling the test from above and adding a new one for the changed functionality)
- This should follow the breaking change process from the stable interface policy