value of primaryKey in JSONSerializer not referenced

An error is incorrectly thrown when reading an array of data with a custom id defined by the primaryKey attribute of the JSONSerializer.