Hi all,
I have a question or rather proposal regarding the JSON representation [1].
The "Geo" example on the JSON page[1] implies that there won't be a fixed representation for data types. Instead of the "value" key that all the other examples use, the Geo example uses "longitude" and "latitude". Wouldn't a representation like the following be more appropriate?
"value": { "latitude" : 32.233, "longitude" : -2.233, }
That is, if "snaktype": "value", then there has to be a "value" key with a data type specific value object.
Something that imho would also be useful, is a way to specify the data type - this could be optional. For the Geo example something like the following would make sense:
"datatype": "geo"
Without such a definition, a consumer would have to derive the data type from the keys and/or the lexical representation of the values, which would usually be a tough task.
Cheers, Andreas
1. https://meta.wikimedia.org/wiki/Wikidata/Development/Phase_2_JSON