given answer is wrong
import json
input_file = 'raw-data.txt'
dictionary_1 = {}
fields = ['Device type', 'IP_Address', 'IOS_type', 'Username', 'Password']
# (Open the input file for reading):
((( with open(input_file) as text: )))
device_number = 1
for line in text:
description = list(line.strip().split(None, 4))
print(description)
Device_Number = 'Device' + str(device_number)
i = 0
# (Open the output file for writing):
((( out_file = open("Json-Output.json", "w") )))
json.dump(dictionary_1, out_file, indent=4)
# (Close the output file after writing):
((( out_file.close() )))