I have the following code in a codeigniter REST app (built using: https://github.com/chriskacerguis/codeigniter-restserver)
public function fullname_get() { $
Try this
$fullname = array("fname"=>"john", "lname"=>"doe"); $this->response($fullname, 200);//it sends data json format. You don't need to json encode it
You got that response because your data is json encoded twice