Sometimes it's necessary to encode stuff as map rather than array even if keys are consecutive.