public SearchResult buildResultFromConfluence(JSONObject json) throws JSONException {
		SearchResult result = new SearchResult();

		JSONArray links = json.getJSONArray("link");

		for (int i = 0; i < links.length(); i++) {
			JSONObject link = links.getJSONObject(0);
			if (link.has("type") && link.getString("type").equals("text/html")) {
				result.url = StringEscapeUtils.escapeHtml(link.getString("href"));
				break;
			}
		}

		result.desc = StringEscapeUtils.escapeHtml(json.getString("title"));
		if (result.desc.length() > 300) {
			result.desc = result.desc.substring(0, 300);
		}
		if (json.has("creator")) {
			result.author = StringEscapeUtils.escapeHtml(json.getJSONObject("creator").getString("name"));
		}
		result.created = StringEscapeUtils.escapeHtml(json.getJSONObject("createdDate").getString("date"));
		result.fileType = StringEscapeUtils.escapeHtml(json.getString("type"));
		result.title = StringEscapeUtils.escapeHtml(json.getString("title"));
		result.jiraType = null;
		result.jiraGroup = null;
		result.confluenceSpace = StringEscapeUtils.escapeHtml(json.getJSONObject("space").getString("name"));

		return result;
	}