refactory JsonResponse