Get the decoder.
(self, obj)
| 123 | self.__decoder__ = decoder |
| 124 | |
| 125 | def _decode(self, obj): |
| 126 | """Get the decoder.""" |
| 127 | if obj is None: |
| 128 | return obj |
| 129 | |
| 130 | try: |
| 131 | x = self.__decoder__.decode(obj) |
| 132 | if x is None: |
| 133 | raise TypeError |
| 134 | return x |
| 135 | except TypeError: |
| 136 | try: |
| 137 | return self.__decoder__.decode(obj.decode()) |
| 138 | except AttributeError: |
| 139 | return decode_list(obj) |
| 140 | except (AttributeError, JSONDecodeError): |
| 141 | return decode_list(obj) |
| 142 | |
| 143 | def _decode_json_numop(self, obj, **kwargs): |
| 144 | """Decode a JSON.NUMINCRBY / JSON.NUMMULTBY result and normalise |
no test coverage detected