JSON encoder that special cases some types
(o: object)
| 193 | |
| 194 | |
| 195 | def default(o: object) -> object: |
| 196 | """ |
| 197 | JSON encoder that special cases some types |
| 198 | """ |
| 199 | |
| 200 | t = encode_module_value(type(o)) |
| 201 | v = encode(o) |
| 202 | if v: |
| 203 | return {"t": t, "v": v} |
| 204 | return {"t": t} |
| 205 | |
| 206 | |
| 207 | # cache this b/c its expesnive |
nothing calls this directly
no test coverage detected