jenkins-bot has submitted this change and it was merged. Change subject: Add information about quantity values to JSON docs ......................................................................
Add information about quantity values to JSON docs Change-Id: I385ebf304dbfe08b2b6d6c77f42d903c44483fec --- M docs/json.wiki 1 file changed, 21 insertions(+), 0 deletions(-) Approvals: Jonas Kress (WMDE): Looks good to me, approved Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/docs/json.wiki b/docs/json.wiki index 7a8421c..b3fb25f 100644 --- a/docs/json.wiki +++ b/docs/json.wiki @@ -366,6 +366,27 @@ * '''globe''': the URI of a reference globe. This would typically refer to a data item on wikidata.org. This is usually just an indication of the celestial body (e.g. Q2 = earth), but could be more specific, like WGS 84 or ED50. * '''''altitude''''': ''Deprecated and no longer used. Will be dropped in the future.'' +===== quantity ===== + +<syntaxhighlight lang="javascript"> + "datavalue": { + "value":{ + "amount":"+10.38", + "upperBound":"+10.375", + "lowerBound":"+10.385", + "unit":"http://www.wikidata.org/entity/Q712226" + }, + "type":"quantity" + } +</syntaxhighlight> + +Quantity values are given as a map with the following fields: + +* '''amount''': The nominal value of the quantity, as an arbitrary precision decimal string. The string always starts with a character indicating the sign of the value, either "+" or "-". +* '''upperBound''': Optionally, the upper bound of the quantity's uncertainty interval, using the same notation as the amount field. If not given or null, the uncertainty (or precision) of the quantity is not known. If the upperBound field is given, the lowerBound field must also be given. +* '''lowerBound''': Optionally, the lower bound of the quantity's uncertainty interval, using the same notation as the amount field. If not given or null, the uncertainty (or precision) of the quantity is not known. If the lowerBound field is given, the upperBound field must also be given. +* '''unit''': the URI of a unit (or "1" to indicate a unit-less quantity). This would typically refer to a data item on wikidata.org, e.g. http://www.wikidata.org/entity/Q712226 for "square kilometer". + ===== time ===== <syntaxhighlight lang="javascript"> -- To view, visit https://gerrit.wikimedia.org/r/305520 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I385ebf304dbfe08b2b6d6c77f42d903c44483fec Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Kinzler <daniel.kinz...@wikimedia.de> Gerrit-Reviewer: Aude <aude.w...@gmail.com> Gerrit-Reviewer: Jonas Kress (WMDE) <jonas.kr...@wikimedia.de> Gerrit-Reviewer: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits