This .json file contains record from ECG machine. The file format looks like this:
[-0.140625,-0.15234375,-0.15234375,...,-0.19335937499999997,0 ]
However, when I try to use this code, it shows an error
def load_tester(path):
dataset = '{"fruits": }'
data = json.loads(path)
print(data)
return(np.asarray(nt))
this is the error:
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I want to save that file into numpy array and become as same as the format that the json uses.
ndarraycan be saved into a json file, as it is. You could convert it to alistusingmy_array.tolist()and then store it to json.