https://bugzilla.wikimedia.org/show_bug.cgi?id=54235
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jayvdb@gmail.com
--- Comment #2 from John Mark Vandenberg jayvdb@gmail.com --- It looks like the problem mentioned in comment 1 is no longer an problem, as the JSON now includes the mainsnak datatype, whereas I assume it didnt previously based on comment 1.
e.g. q76 JSON now includes "datatype"
"P18": [ { "id": "q76$AA25BE21-FFCA-4C0A-A7B4-C041CBE549F7", "mainsnak": { "snaktype": "value", "property": "P18", "datatype": "commonsMedia", "datavalue": { "value": "President Barack Obama.jpg", "type": "string" } },
I ran into a very tightly related bug while loading items from an xml dump, without access to the wiki the dump was from - such as with a firewall in the way.
If I understand this correctly, any time the JSON parser finds a 'datatype' in a snak, it can use that instead of doing a lookup. The JSON *may* not include this, in which a lookup is required, and if a lookup isnt possible then the code should raise an appropriate exception.