MCPcopy Create free account
hub / github.com/eternnoir/pyTelegramBotAPI / de_json

Method de_json

telebot/types.py:6366–6374  ·  view source on GitHub ↗
(cls, json_string)

Source from the content-addressed store, hash-verified

6364 """
6365 @classmethod
6366 def de_json(cls, json_string):
6367 if json_string is None: return None
6368 obj = cls.check_json(json_string)
6369 obj['photo'] = Game.parse_photo(obj['photo'])
6370 if 'text_entities' in obj:
6371 obj['text_entities'] = Game.parse_entities(obj['text_entities'])
6372 if 'animation' in obj:
6373 obj['animation'] = Animation.de_json(obj['animation'])
6374 return cls(**obj)
6375
6376 @classmethod
6377 def parse_photo(cls, photo_size_array) -> List[PhotoSize]:

Callers

nothing calls this directly

Calls 4

check_jsonMethod · 0.80
parse_photoMethod · 0.45
parse_entitiesMethod · 0.45
de_jsonMethod · 0.45

Tested by

no test coverage detected