I have the following string:
{\"Coords\":[{\"Accuracy\":\"65\",\"Latitude\":\"53.277720488429026\",\"Longitude\":\"-9.012038778269686\",\"Timestamp\":\"Fri J
It was an old question, still answer to make it clear for someone who just encounters it like me.
try json_encode($traces);
in my case
return var_dump(json_encode($result[0]));
the result is:
string(34) "{"id":1,"content":"test database"}"