From cbec4ad0272e921d01300247aecd95315aa2faf2 Mon Sep 17 00:00:00 2001 From: Rok Garbas Date: Thu, 11 Jun 2020 16:33:25 +0200 Subject: [PATCH] Nix language primitives are luckily the same as in JSON (#88) fixes #68 --- scripts/import-channel | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/import-channel b/scripts/import-channel index 16c1de7..36a6bc2 100755 --- a/scripts/import-channel +++ b/scripts/import-channel @@ -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: