I have a json file and I am trying to load its contents line by line using json.loads command but I am getting below error-
"simplejson.errors.JSONDecodeError: Invalid control character '\x00' at: line 1 column 536 (char 535)"
Code snippet-
import simplejson as json
with open(file_path) as file:
for line in file:
line_contents = json.loads(line)#.replace('\x00',' ')
Note: I also tried replacing '\x00' with ' ' but it didn't help and threw another error-
"simplejson.errors.JSONDecodeError: Unterminated string starting at: line 1 column 163 (char 162)"
Any help would be appreciated!