If I use json_encode() on an array like this:
return json_encode(array( 'foo' => 'bar'));
The return is:
{'foo' : 'bar'}
The key is passed as a literal, and that is tripping up my script. What I really need is:
{ foo : 'bar' }
Does json_encode do that or do I have to strip the quotes out myself with some ugly regex?