This is my array to be encoded in PHP:
array (size=1)
0 =>
object(stdClass)[70]
public 'company' => string 'Mc.SUP s. r. o.' (length=15)
public 'fullname' => string ' Jaroslav Antoň' (length=17)
public 'id' => string '1956' (length=4)
public 'editable' => string '1' (length=1)
The string result is:
'[{"company":"Mc.SUP s. r. o.","fullname":" \tJaroslav Anto\u0148","id":"1956","editable":"1"}]'
When trying to use Javascript JSON.parse I got this error message: SyntaxError: JSON.parse: bad control character in string literal at line 1 column 56 of the JSON data
I investigated it and the problematic is \t.
Does somebody know the easy way how to extra escape it? Something like options in json_encode function. Thanks in advance