(self, o)
| 25 | |
| 26 | class JsonEncoder(json.JSONEncoder): |
| 27 | def default(self, o): |
| 28 | if isinstance(o, Benchmark): |
| 29 | return BenchmarkCodec.encode(o) |
| 30 | |
| 31 | if isinstance(o, BenchmarkSuite): |
| 32 | return BenchmarkSuiteCodec.encode(o) |
| 33 | |
| 34 | if isinstance(o, BenchmarkRunner): |
| 35 | return BenchmarkRunnerCodec.encode(o) |
| 36 | |
| 37 | if isinstance(o, BenchmarkComparator): |
| 38 | return BenchmarkComparatorCodec.encode(o) |
| 39 | |
| 40 | return json.JSONEncoder.default(self, o) |
| 41 | |
| 42 | |
| 43 | class BenchmarkCodec: |