I have json data represented like this
{key:\"value\"}
(no quotes arround key...)
I want to translate it to an associative array.>
Please do not use regexps to do this! JSON grammar cannot be correctly parsed this way by definition. You will open yourself to a ton of future bugs.
I recommend using a YAML parser, because YAML is a superset of JSON and allows unquoted literals at the same time.
Symfony YAML component works great.
There will be a performance penalty in comparison to json_decode which is implemented natively.