Nix language primitives are luckily the same as in JSON (#88)

fixes #68
This commit is contained in:
Rok Garbas 2020-06-11 16:33:25 +02:00 committed by GitHub
parent 007eee127e
commit cbec4ad027
Failed to generate hash of commit

View file

@ -386,15 +386,14 @@ def get_options(evaluation):
for name, option in options:
default = option.get("default")
if default is not None:
default = str(default)
default = json.dumps(default)
example = option.get("example")
if example is not None:
if (type(example) == dict and example.get("_type") == "literalExample"):
example = str(example["text"])
example = json.dumps(example["text"])
else:
example = str(example)
example = json.dumps(example)
description = option.get("description")
if description is not None: