Hi all,
I’m using mysql partially as a document store (some data is stored with usual varchar/int columns, some in a json column). Querying the database results into an array containing usual values and a one or two json documents - a simple example of a single row result would be:
$res[0] = [ 'id' => 1, 'owner' => 475, 'config' => '{ "token": "something" }' ]
now, if I return->withJson($res)
, i get the json coming from the database escaped.
{
"status":"Success",
"code":200,"data": [
{
"id":1,
"owner":475,
"config":"{\"token\": \"something\"}",
}
]
}
what would you consider the best way to dealing with this situation? I hope there’s a magic bullet that won’t be a pita, so any tips will be greatly appreciated.