Dear Wikidata JSON export team,
There seems to be a sytnax error in the 20120112 JSON file that (I think) has already been there in the previous dump. So I guess it makes sense to report it.
In line 9374899, around column 2648 of the 20120112 JSON dump, we find
"snaks":[]
Of course, {} would be correct here instead of []. The entity that this JSON occurs in is Q4383128.
Cheers,
Markus
Hey,
I seemed to recall this being reported earlier, it being discussed, and a fix being created.
And indeed, a change was made to the serialization component to optionally force the values to be objects rather than lists: https://github.com/wmde/WikibaseDataModelSerialization/commit/83e999983149c7...
Funnily enough this option is not used anywhere in the actual Wikibase extensions, which means the behaviour is entirely unchanged. Looking at the relevant code in the serializer [0], I do wonder why an option was added, rather than simply always using an object. Is there a case where we want objects when there are entries and a list when there are none? And if so, should that really be the default behaviour?
[0] https://github.com/wmde/WikibaseDataModelSerialization/blob/master/src/Seria...
Cheers
-- Jeroen De Dauw - http://www.bn2vs.com Software craftsmanship advocate Evil software architect at Wikimedia Germany ~=[,,_,,]:3
On 20.01.2015 19:20, Jeroen De Dauw wrote:
Hey,
I seemed to recall this being reported earlier, it being discussed, and a fix being created.
Yes. And in spite of your analysis, the problem seems to have almost disappeared after that. It used to be all over the dataset, now it is just in one single item, while the remaining 16713639 work. If the fix (or some other fix) would not have worked at all, it would be mysterious why the problem occurs only once. OTOH, it is also mysterious how one single item could resist being fixed.
Markus
And indeed, a change was made to the serialization component to optionally force the values to be objects rather than lists: https://github.com/wmde/WikibaseDataModelSerialization/commit/83e999983149c7...
Funnily enough this option is not used anywhere in the actual Wikibase extensions, which means the behaviour is entirely unchanged. Looking at the relevant code in the serializer [0], I do wonder why an option was added, rather than simply always using an object. Is there a case where we want objects when there are entries and a list when there are none? And if so, should that really be the default behaviour?
[0] https://github.com/wmde/WikibaseDataModelSerialization/blob/master/src/Seria...
Cheers
-- Jeroen De Dauw - http://www.bn2vs.com Software craftsmanship advocate Evil software architect at Wikimedia Germany ~=[,,_,,]:3
Wikidata-l mailing list Wikidata-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-l