Skip to content

Commit 985ba89

Browse files
author
Juliya Smith
authored
Remove extra space from raw json for syslog purposes (#146)
1 parent 0ff1761 commit 985ba89

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/code42cli/output_formats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def to_table(output, header):
9090

9191
def to_json(output):
9292
"""Output is a single record"""
93-
return "{}\n".format(json.dumps(output))
93+
return "{}".format(json.dumps(output))
9494

9595

9696
def to_formatted_json(output):

tests/test_output_formats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def test_to_table_when_not_given_header_creates_header_dynamically():
136136

137137
def test_to_json():
138138
formatted_output = output_formats_module.to_json(TEST_DATA)
139-
assert formatted_output == "{}\n".format(json.dumps(TEST_DATA))
139+
assert formatted_output == json.dumps(TEST_DATA)
140140

141141

142142
def test_to_formatted_json():

0 commit comments

Comments
 (0)