PHP richiede che i dati JSON siano codificati in UTF-8 per poter essere interpretati.
La soluzione è la seguente:
$json_file = file_get_contents('file.json');
$json_data = utf8_encode($json_file);
$json_obj = json_decode($json_data);
PHP richiede che i dati JSON siano codificati in UTF-8 per poter essere interpretati.
La soluzione è la seguente:
$json_file = file_get_contents('file.json');
$json_data = utf8_encode($json_file);
$json_obj = json_decode($json_data);