move JsonResponse into Util.php