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

Function json_value

tools/fromschema.py:28–38  ·  view source on GitHub ↗

Format obj in the JSON style for a value

(obj)

Source from the content-addressed store, hash-verified

26
27
28def json_value(obj):
29 """Format obj in the JSON style for a value"""
30 if type(obj) is bool:
31 if obj:
32 return '*true*'
33 return '*false*'
34 if type(obj) is str:
35 return '"' + esc_underscores(obj) + '"'
36 if obj is None:
37 return '*null*'
38 assert False
39
40
41def outputs(lines, separator=''):

Callers 2

output_rangeFunction · 0.85
output_membersFunction · 0.85

Calls 1

esc_underscoresFunction · 0.85

Tested by

no test coverage detected