self.code = 0
self.coordinates = []
self.population = 0

def __str__(self):
    fields = ['  {}={!r}'.format(k, v) for k, v in list(self.__dict__.items()) if
        not k.startswith('_')]
return '{}(\n{})'.format(self.__class__.__name__, '\n'.join(fields))
with open('metros.json') as metros_file:
    json_obj = json.load(metros_file)
metros = [Metro(**metro_info) for metro_info in json_obj['metros']]
for metro in metros:
    pass
разбор массива json в python