Пример #1
0
 def to_json(self):
   res = Base.to_json(self)
   res['level'] = self.level
   return res
Пример #2
0
 def to_json(self):
   data = Base.to_json(self)
   data['options'] = [o.to_json() for o in self.options]
   return data
Пример #3
0
 def to_json(self):
     data = Base.to_json(self)
     data['name'] = f'{self.size} / {self.color}'
     return data