I have created a custom api following "inchoo" tutorial. But I am getting the data in string format instead of json.
From my browser I am getting a tag surrounding the api return as below. But Chrome's postman extension showing a double quote ("") and some extra slashes () in the in the response even after header to "Accept":"application/json" and "Content-Type":"application/json". I just want to receive the exact same string I am returning in my Model class.
public function name() {
//return "Hello, raihanruhin";
$arr = '[{"name":"MasterCard"},{"name":"VISA"}, {"name":"DBBL-NEXUS"}, {"name":"American Express"}]';
return $arr;
}