(self, obj)
| 420 | json.JSONDecoder.__init__(self, object_hook=self.object_hook, *args, **kwargs) |
| 421 | |
| 422 | def object_hook(self, obj): |
| 423 | if '_type' not in obj: |
| 424 | return obj |
| 425 | _type = obj.pop('_type') |
| 426 | if _type == 'Resource': |
| 427 | return Resource(client=self.client, **obj) |
| 428 | elif _type == 'ResourceList': |
| 429 | return ResourceList(self.client, **obj) |
| 430 | elif _type == 'ResourceGroup': |
| 431 | return ResourceGroup(obj['preferred'], resources=self.object_hook(obj['resources'])) |
| 432 | return obj |
nothing calls this directly
no test coverage detected