(self)
| 26 | self.data = data |
| 27 | |
| 28 | def json(self): |
| 29 | try: |
| 30 | return json.loads(self.data) |
| 31 | except json.JSONDecodeError: |
| 32 | logger.warning( |
| 33 | f"Failed to decode JSON data: {self.data[:100]}... Trying workaround" |
| 34 | ) |
| 35 | return self.workaround_decode_json() |
| 36 | |
| 37 | def workaround_decode_json(self): |
| 38 | if self.data.startswith("\\x"): |