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&...). 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 https://phabricator.wikimedia.org/T241422.
If you have any questions please do not hesitate to ask.
Cheers,
wikidata-tech@lists.wikimedia.org