Fix json_encode issue with decimal / integer encoding #162
This commit is contained in:
parent
7237441ec3
commit
0a476f245a
1 changed files with 3 additions and 2 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace App\Ramcar;
|
||||
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class APIResult
|
||||
{
|
||||
|
|
@ -68,7 +68,8 @@ class APIResult
|
|||
'data' => $this->data
|
||||
];
|
||||
|
||||
$json = new JsonResponse($return_data);
|
||||
$json_data = json_encode($return_data, JSON_NUMERIC_CHECK);
|
||||
$json = new Response($json_data);
|
||||
|
||||
return $json;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue