( self, obj, state )
| 5352 | return False |
| 5353 | |
| 5354 | def try_encode_default( self, obj, state ): |
| 5355 | orig_obj = obj |
| 5356 | if self.has_hook('encode_default'): |
| 5357 | try: |
| 5358 | obj = self.call_hook( 'encode_default', obj ) |
| 5359 | except JSONSkipHook: |
| 5360 | pass |
| 5361 | else: |
| 5362 | if obj is not orig_obj: |
| 5363 | # Hook made a transformation, re-encode it |
| 5364 | return self._do_encode( obj, state ) |
| 5365 | |
| 5366 | # End of the road. |
| 5367 | raise JSONEncodeError('can not encode object into a JSON representation',obj) |
| 5368 | |
| 5369 | |
| 5370 | # ------------------------------ |
no test coverage detected