When requesting entities via wbgetentities API module, requested entities which are not in the system will still be taken into the result set with a "missing" attribute. In xml this will look like:
<entities><entity missing="" /></entities>
in JSON:
"entities": { "p1311": { "missing": "" } }
So in the JSON version you can actually still see which entity is missing, in XML you can't.
I would simply suggest taking those references to missing entities entirely out of the result set since the requester can simply check whether all requested entities are actually in the result.
Those "special" entries just make it necessary to differentiate between "real" entity data and other information which requires more additional code.
Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=68251