mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
jsonify needs to return a string of {}, rather than a dict
This commit is contained in:
parent
e4b72c0fd5
commit
cedfec763a
1 changed files with 1 additions and 1 deletions
|
@ -122,7 +122,7 @@ def jsonify(result, format=False):
|
||||||
''' format JSON output (uncompressed or uncompressed) '''
|
''' format JSON output (uncompressed or uncompressed) '''
|
||||||
|
|
||||||
if result is None:
|
if result is None:
|
||||||
return {}
|
return "{}"
|
||||||
result2 = result.copy()
|
result2 = result.copy()
|
||||||
if format:
|
if format:
|
||||||
return json.dumps(result2, sort_keys=True, indent=4)
|
return json.dumps(result2, sort_keys=True, indent=4)
|
||||||
|
|
Loading…
Reference in a new issue