Jsp print json

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page language="java" import="org.json.JSONObject" %>

<%
JSONObject json = new JSONObject();
json.put("city", "Mumbai");
json.put("country", "India");

String output = json.toString();
out.println(output);
%>