MCPcopy Create free account
hub / github.com/ElementsProject/lightning / json_value

Function json_value

tools/fromschema.py:9–19  ·  view source on GitHub ↗

Format obj in the JSON style for a value

(obj)

Source from the content-addressed store, hash-verified

7
8
9def 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
22def outputs(lines):

Callers 2

output_rangeFunction · 0.85
output_membersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected