Hi all!
This is an announcement for a breaking change to the Wikidata API, JSON and RDF binding, to go live on 2016-11-15. It affects all clients that process quantity values.
As Lydia explained in the mail she just sent to the Wikidata list, we have been working on improving our handling of quantity values. In particular, we are making upper- and lower bounds optional: When the uncertainty of a quantity measurement is not explicitly known, we no longer require the bounds to somehow be specified anyway, but allow them to be omitted.
This means that the upperBound and lowerBound fields of quantity values become optional in all API input and output, as well as the JSON dumps and the RDF mapping.
Clients that import quantities should now omit the bounds if they do not have explicit information on the uncertainty of a quantity value.
Clients that process quantity values must be prepared to process such values without any upper and lower bound set.
That is, instead of this
"datavalue":{ "value":{ "amount":"+700", "unit":"1", "upperBound":"+710", "lowerBound":"+690" }, "type":"quantity" },
clients may now also encounter this:
"datavalue":{ "value":{ "amount":"+700", "unit":"1" }, "type":"quantity" },
The intended semantics is that the uncertainty is unspecified if not bounds are present in the XML, JSON or RDF representation. If they are given, the interpretation is as before.
For more information, see the JSON model documentation [1]. Note that quantity bounds have been marked as optional in the documentation since August. The RDF mapping spec [2] has been adjusted accordingly.
This change is scheduled for deployment on November 15.
Please let us know if you have any comments or objections.
-- daniel
[1] https://www.mediawiki.org/wiki/Wikibase/DataModel/JSON [2] https://www.mediawiki.org/wiki/Wikibase/Indexing/RDF_Dump_Format#Quantity
Relevant tickets: * https://phabricator.wikimedia.org/T115269
Relevant patches: * https://gerrit.wikimedia.org/r/#/c/302248 * https://github.com/DataValues/Number/commit/2e126eee1c0067c6c0f35b4fae0388ff11725307