Hi everyone,


This change is relevant for everyone who uses the JSON serialization of Lexeme, Form or Sense entities.


Currently, when a Lexeme Form or Sense has no statements stored, it is rendered as an empty array [] in JSON. (Example <https://www.wikidata.org/w/api.php?action=wbgetentities&format=json&ids=L3872>). We want to serialize it as an empty object {} instead. This change will ease the deserialization process and bring more consistency in our code as nonempty statements are already serialized as objects, not arrays.


The impact of this change will be in the output of wbgetentities and editing APIs, as well as Special:EntityData and the Lexeme JSON dumps.


If you’re maintaining tools that use lexicographical data, you may want to check your code to make sure that it reflects this change, e.g. lexeme forms or senses with no statements are properly deserialized by your tool.


This change is available for testing at test.wikidata.org before deployment to www.wikidata.org. You are welcome to give us general feedback by leaving a comment in this ticket.


If you have any questions please do not hesitate to ask.


Cheers,


--
Mohammed Sadat
Community Communications Manager for Wikidata/Wikibase

Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Phone: +49 (0)30 219 158 26-0
https://wikimedia.de

Keep up to date! Current news and exciting stories about Wikimedia, Wikipedia and Free Knowledge in our newsletter (in German): Subscribe now.

Imagine a world in which every single human being can freely share in the sum of all knowledge. Help us to achieve our vision!
https://spenden.wikimedia.de

Wikimedia Deutschland – Gesellschaft zur Förderung Freien Wissens e. V. Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für Körperschaften I Berlin, Steuernummer 27/029/42207.