Used JsonResponse in Controller

Used JsonResponse instead of Response + json_encode() + setting content type