Encodes an object for serialization. Type is always serialized as well If falsy is returned, the value is not included.
(o: object)
| 49 | |
| 50 | @functools.singledispatch |
| 51 | def encode(o: object) -> object: |
| 52 | """ |
| 53 | Encodes an object for serialization. Type is always serialized as well |
| 54 | If falsy is returned, the value is not included. |
| 55 | """ |
| 56 | return None |
| 57 | |
| 58 | |
| 59 | @encode.register |