From fa9e650ea10053cf1f3c6f469f430b68b27b5ca7 Mon Sep 17 00:00:00 2001 From: derrod Date: Sat, 16 Oct 2021 18:58:20 +0200 Subject: [PATCH] [cli] Ensure "info" JSON output items are null if empty --- legendary/cli.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/legendary/cli.py b/legendary/cli.py index 3e7f637..18e9108 100644 --- a/legendary/cli.py +++ b/legendary/cli.py @@ -1590,6 +1590,10 @@ class LegendaryCLI: json_out['install'][info_item.json_name] = info_item.json_value for info_item in info_items['manifest']: json_out['manifest'][info_item.json_name] = info_item.json_value + # set empty items to null + for key, value in json_out.items(): + if not value: + json_out[key] = None return self._print_json(json_out, args.pretty_json) def alias(self, args):