I have json data represented like this
{key:\"value\"}
(no quotes arround key...)
I want to translate it to an associative array.>
You can either fix the JSON at the source so that it returns a valid JSON structure, or you can manually add quotes around the keys.
This answer to a similar question has an example of how to do that:
function my_json_decode($s) {
$s = str_replace(
array('"', "'"),
array('\"', '"'),
$s
);
$s = preg_replace('/(\w+):/i', '"\1":', $s);
return json_decode(sprintf('{%s}', $s));
}