make sure we get use an integer as entity key in the JSON object