handle trailing commas when deserializing