I have this data of array in php that converted to json
$dataraw = $_SESSION['image'];
$datagambar = json_encode($dataraw);
$escaped_json = escapeshellarg($datagambar);
Escaped_json output as strings:
"[{ FileName : 20221227_202035.jpg , Model : SM-A528B , Longitude :106.904251, Latitude :-6.167665},{ FileName : 20221227_202157.jpg , Model : SM-A528B , Longitude :106.9042428, Latitude :-6.167658099722223}]"
Datagambar output as array :
[{"FileName":"20221227_202035.jpg","Model":"SM-A528B","Longitude":106.904251,"Latitude":-6.167665},{"FileName":"20221227_202157.jpg","Model":"SM-A528B","Longitude":106.9042428,"Latitude":-6.167658099722223}]
I want to call it to python, this is my py code
escaped_json = sys.argv[1]
parsed_data = json.loads(escaped_json)
print (parsed_data[0])
But from parsed_data = json.loads(escaped_json)
I get an error JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Is there any suggestions how to fix it?