@SuppressWarnings("unchecked")
	@Override
	public void doHandler(LessDataPacket command, LessDataPacket ret) {
		if(log.isDebugEnabled())
			log.debug("JsonHandler:"+command);
		Map<String,Object> param = null;
		try{
			param = JSON.parseObject(command.getContent(),Map.class);
		}catch(JSONException e){
			log.error(""+command,e);
		}
		if(param==null)
			ret.setContent("{}");
		else{ 
			Map<String,Object> retm = new HashMap<String,Object>();
			retm.put("r", param.get("r"));
			JsonCommand jcommand = commands.get(param.get("c"));
			if(jcommand!=null)
				jcommand.doCommand(param, retm);
			ret.setContent(JSON.toJSONString(retm));
		}
	}