Made JsonResponse more flexible.