public function serializeSingleObject(array $data, $type,  $statusCode = Response::HTTP_OK)
    {
        $model = new ResponseModel($data, $type);

        return new JsonResponse($model->getBody(), $statusCode);
    }
public function serializeSingleObject(array $data, $type,  $statusCode = Response::HTTP_OK)
    {
        $model = new ResponseModel($data, $type);

        return new JsonResponse($model->getBody(), $statusCode);
    }
public function serializeSingleObject ( array $ data , $ type , $ statusCode = Response :: HTTP_OK ) { $ model = new ResponseModel ( $ data , $ type ) ; return new JsonResponse ( $ model -> getBody ( ) , $ statusCode ) ; }
Serializes the json response

@param array $data
@param string $type
@param int $statusCode http response status code
@return \Symfony\Component\HttpFoundation\JsonResponse
Serializes the json response