This is not a valid json syntax, try to fix it.
If you don't can because you cant influence the api because you don't have developed it, you could try it over regex parsing like this :
<?php
//print out the result
var_dump(getInvalidCustomJson('{"0":168,"1":168}'));
function getInvalidCustomJson($json){
$res = array(); // result array which get returned
preg_match_all('/"([0-9]+)".([0-9]+)/m',$json, $result, PREG_PATTERN_ORDER); // matching a key between "..." and a value which get send afterwards
for($i = 0; $i < count($result[0]); $i++){ // go through all results
$std = array();
$std[$result[1][$i]] = $result[2][$i]; // insert key and value from the groups into the array
$res[] = $std; // add the array to the result array
// $res[$result[1][$i]] = $result[2][$i]; wont work because it will
// overwrite the key like json decoder does
}
return $res; // return array
}
?>