Error returning JSON

0

I have a REST API that works correctly in my local environment but in production is cutting a part of the return.

{"status":"sucesso","data":{"return":"Inser\u00e7\u00e3o de lead efetuada com sucesso.

The correct one would be:

{"status":"sucesso","data":{"return":"Inser\u00e7\u00e3o de lead efetuada com sucesso."}}

The error that is being displayed is this:

SyntaxError: JSON.parse: unterminated string at line 1 column 87 of the JSON data

Can anyone tell me why? It should be some configuration on the production server since in the local environment it returns correctly.

[EDIT] I'm using Code Igniter, the code that mounts the return is this:

$retorno_api = array(
  'status' => 'sucesso',
  'data' => array(
  'return' => $acao_efetuada.' de lead efetuada com sucesso.')
);

And I return using response() of the Code Igniter Rest Controller:

$this->response($retorno_api);
    
asked by anonymous 21.12.2017 / 14:50

0 answers