json() 보호된 메소드

Returns a JsonResponse that uses the serializer component if enabled, or json_encode.
protected json ( mixed $data, integer $status = 200, array $headers = [], array $context = [] ) : Symfony\Component\HttpFoundation\JsonResponse
$data mixed The response data
$status integer The status code to use for the Response
$headers array Array of extra headers to add
$context array Context to pass to serializer when using serializer component
리턴 Symfony\Component\HttpFoundation\JsonResponse
예제 #1
0
 public function json($data, $status = 200, $headers = array(), $context = array())
 {
     return parent::json($data, $status, $headers, $context);
 }