Code example for JSONStringer

0
	 * @param conn the websocket connection 
	 * @throws JSONException the jSON exception 
	 */ 
	private void sendMessagesCleared(WebSocketConnection conn) throws JSONException {
		if (conn != null) {
			conn.send(new JSONStringer().object()
				.key("method").value("Console.messagesCleared")
				.endObject()
			.toString());
		} 
	} 
	 
	/** 
	 * Send "Console.messageAdded" message to debugger frontend. 
	 * 
	 * @param conn the conn 
	 * @param msg the msg 
	 * @throws JSONException the jSON exception 
	 */ 
	private void sendMessageAdded(WebSocketConnection conn, JSONObject msg) throws JSONException {