Nix language primitives are luckily the same as in JSON (#88)
fixes #68
This commit is contained in:
parent
007eee127e
commit
cbec4ad027
|
@ -386,15 +386,14 @@ def get_options(evaluation):
|
||||||
for name, option in options:
|
for name, option in options:
|
||||||
default = option.get("default")
|
default = option.get("default")
|
||||||
if default is not None:
|
if default is not None:
|
||||||
default = str(default)
|
default = json.dumps(default)
|
||||||
|
|
||||||
|
|
||||||
example = option.get("example")
|
example = option.get("example")
|
||||||
if example is not None:
|
if example is not None:
|
||||||
if (type(example) == dict and example.get("_type") == "literalExample"):
|
if (type(example) == dict and example.get("_type") == "literalExample"):
|
||||||
example = str(example["text"])
|
example = json.dumps(example["text"])
|
||||||
else:
|
else:
|
||||||
example = str(example)
|
example = json.dumps(example)
|
||||||
|
|
||||||
description = option.get("description")
|
description = option.get("description")
|
||||||
if description is not None:
|
if description is not None:
|
||||||
|
|
Loading…
Reference in a new issue