Format obj in the JSON style for a value
(obj)
| 7 | |
| 8 | |
| 9 | def json_value(obj): |
| 10 | """Format obj in the JSON style for a value""" |
| 11 | if type(obj) is bool: |
| 12 | if obj: |
| 13 | return '*true*' |
| 14 | return '*false*' |
| 15 | if type(obj) is str: |
| 16 | return '"' + obj + '"' |
| 17 | if obj is None: |
| 18 | return '*null*' |
| 19 | assert False |
| 20 | |
| 21 | |
| 22 | def outputs(lines): |
no outgoing calls
no test coverage detected