On 01.09.2015 05:11, Stas Malyshev wrote:
Hi!
Then what happens with the
"unit":"1" that currently we have in JSON? It
seems that one cannot enter this string in the field, and I guess it
would (rightly) be invalid as a unit. Will Wikibase continue to use this
(invalid) string as a placeholder for "no unit"?
We could make a bot to convert those to Q199. RDF export already does
it. Of course, not all of them are actually unit-less values, some of
them may be something that actually needs a unit, so we could wait for a
while to give people a chance to fix that and then convert the remaining
ones to Q199.
The question is if "https://www.wikidata.org/entity/Q199" is really
supposed to be the new "1" in the UI and/or JSON. At the moment,
entering "https://www.wikidata.org/entity/Q199" as a unit in the UI does
not lead to a unit-less value.
Also, I don't see a reason why the JSON encoding should use an IRI
there. It makes sense to use a fixed IRI in RDF, since it is easier to
query, but for JSON the easiest solution would be to use some fixed
string (e.g., "" or even the current "1"). Replacing "1" by
a longer IRI
string does not seem to help anyone. I would suggest keeping the "1" as
a marker for "no unit". Of course, this "1" would never be shown in
the
UI (but this is already as it is implemented :-). This solution would
also provide best backwards compatibility for JSON users and incur no
transition cost for Wikidata.
Regarding the IRI used in RDF, we should consider minting a special IRI
in the Wikibase ontology for this special case. We already know that
there is only one "1" and its meaning will have to be hardcoded in
Wikibase and elsewhere. If we create a special IRI for denoting this
situation, it will be better distinguished from other (regular) units,
and there will be no dependency on the current content of Wikidata's Q199.
Markus