Hello all,
This change is relevant for everyone *using APIs, JSON output and dumps in
their tools or gadgets*.
Currently, when an object is empty (for example descriptions and aliases),
it is rendered as an empty array [] in JSON. (Example
<https://www.wikidata.org/wiki/Special:EntityData/Q24075199.json>) We want
to serialized it as an empty object {} instead. This change will ease the
deserialization process and bring more consistency in our code as some
other places already use JSON objects instead of arrays.
The impact of this change will be in JSON outputs (Special:EntityData) and
JSON dumps, as well as the output of wbgetentities, wbgetclaims and editing
APIs.
If you’re maintaining tools that use Special:EntityData, you may want to
check your code to make sure that it reflects this change, e.g. items with
no labels, descriptions, aliases or sitelinks are properly deserialized by
your tool.
You can already *test your code* against our test system on
beta.wikidata.org, for example on this item
<https://wikidata.beta.wmflabs.org/wiki/Special:EntityData/Q521829.json>.
According to our stable interface policy
<https://www.wikidata.org/wiki/Wikidata:Stable_Interface_Policy>, the
change will be enabled four weeks after this announcement, on April 30th.
In the meantime, if you have any issue or question, feel free to leave a
comment in this ticket <https://phabricator.wikimedia.org/T138104>.
Thanks for your attention,
--
Léa Lacroix
Project Manager Community Communication for Wikidata
Wikimedia Deutschland e.V.
Tempelhofer Ufer 23-24
10963 Berlin
www.wikimedia.de
Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e. V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter
der Nummer 23855 Nz. Als gemeinnützig anerkannt durch das Finanzamt für
Körperschaften I Berlin, Steuernummer 27/029/42207.