public JSONObject toJSONObject(String languagecode, String p) {
		JSONObject jresult = new JSONObject();
		if (p.equals("*")) {
			JSONArray ar = new JSONArray();
			jresult.put("properties", ar);
			for(Iterator<String> i = this.getKeys(); i.hasNext();){
				JSONObject n = new JSONObject();
				String key = i.next();
				String value = getProperty(key);
				n.put("name",key);
				n.put("value",value);
				ar.add(n);
			}
		} else {
			String[] properties = p.split(",");
			if (properties != null) {
				for (int i=0;i<properties.length;i++) {
					String key = properties[i];
					String value = this.getSmartProperty(languagecode,key);
					if (value!=null) {
						jresult.put(key, value);
					} else {
						jresult.put(key,"");
					}
				}
			}
		}
		return jresult;
	}