@SuppressWarnings("unchecked") public static String formXML(JSONArray array, boolean success) { StringBuilder sb = new StringBuilder(); sb.append("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"); sb.append("<results>\n"); sb.append("<success>" + success + "</success>\n"); sb.append("<total>" + array.size() + "</total>\n"); sb.append("<rows>"); JSONObject object = null; for (int i = 0; i < array.size(); i++) { object = array.getJSONObject(i); Iterator<String> o = object.keys(); sb.append("<unit>\n"); for (; o.hasNext(); ) { String temp = o.next(); sb.append("<" + temp + ">"); sb.append(object.getString(temp)); sb.append("</" + temp + ">\n"); } sb.append("</unit>\n"); } sb.append("</rows>\n"); sb.append("</results>"); if (object != null) { object.clear(); object = null; } return sb.toString(); }
public static Map getRecursiveMapFromJson(String jsonString) { setDataFormat2JAVA(); JSONObject jsonObject = JSONObject.fromObject(jsonString); Map map = new HashMap(); String key = "", value = ""; Map subMap = null; for (Iterator iter = jsonObject.keys(); iter.hasNext(); ) { key = (String) iter.next(); value = jsonObject.get(key) + ""; if (isJson(value)) { if (SSO.tioe(value)) { continue; } value = value.trim(); if (value.startsWith("[") && value.endsWith("]")) { value = value.substring(1, value.length() - 1); } subMap = getRecursiveMapFromJson(value); map.put(key, subMap); } else { map.put(key, value); } } return map; }
public String simplePost(JSONObject jsonParam, String remoteUrl, String charSet) { List<NameValuePair> params = new ArrayList<NameValuePair>(); String key = ""; for (Iterator<?> iterator = jsonParam.keys(); iterator.hasNext(); ) { key = String.valueOf(iterator.next()); params.add(new BasicNameValuePair(key, jsonParam.getString(key))); } UrlEncodedFormEntity entity = null; try { entity = new UrlEncodedFormEntity(params, "UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } HttpPost post = new HttpPost(remoteUrl); post.setHeader("accept", "*/*"); post.setHeader("connection", "Keep-Alive"); post.setEntity(entity); HttpClient client = new DefaultHttpClient(); HttpResponse response = null; HttpEntity httpEntity = null; String result = ""; try { response = client.execute(post); httpEntity = response.getEntity(); result = EntityUtils.toString(httpEntity); } catch (ClientProtocolException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return result; }
@SuppressWarnings("unchecked") public String decorate(TableContext context, Integer index, FilterData filterData, DataItem item) throws Exception { Div div = new Div(); JSONObject obj = this.getJsonValues(parameters); if (obj != null) { Iterator iterator = obj.keys(); while (iterator.hasNext()) { Object key = iterator.next(); Object value = obj.get(key); Input radio = new Input(); radio.setName("filterData.items[" + index + "].value"); radio.setType("radio"); radio.setTagText(this.getText(context, value.toString())); radio.setValue(key.toString()); radio.setChecked(this.isSelected(filterData, item, key)); div.addElement(radio); } } return this.addHiddenValues(index, item) + div.toString(); }
public static Map getMapFromJson(String jsonString) { setDataFormat2JAVA(); JSONObject jsonObject = JSONObject.fromObject(jsonString); Map map = new HashMap(); for (Iterator iter = jsonObject.keys(); iter.hasNext(); ) { String key = (String) iter.next(); map.put(key, jsonObject.get(key)); } return map; }
private Object getObjFromJson(String jsonString, String orderId) { JSONObject jsonObject = JSONObject.fromObject(jsonString); Map map = new HashMap(); for (Iterator iter = jsonObject.keys(); iter.hasNext(); ) { String key = (String) iter.next(); map.put(key, jsonObject.get(key)); } map.put("orderId", orderId); return JSONObject.fromObject(map); }
private Processing createProcess(ProcessLibrary library, JSONObject param) throws ProcessingException { Processing _p = library.createProcess(param.getString("id")); JSONObject _params = param.getJSONObject("params"); Iterator _keys = _params.keys(); while (_keys.hasNext()) { String _k = (String) _keys.next(); library.setInput(_p, _k, _params.get(_k)); } return _p; }
public static Map<String, Object> json2Map(String jsonString) { JSONObject jsonObject = JSONObject.fromObject(jsonString); Iterator<String> iter = jsonObject.keys(); String key; Object value; Map<String, Object> map = new HashMap<String, Object>(); while (iter.hasNext()) { key = (String) iter.next(); value = jsonObject.get(key); map.put(key, value); } return map; }
public NameValuePair[] addSigParamTpHttpRequest(String sigInfoJson) { JSONObject sigObj = new JSONObject(sigInfoJson); Iterator<String> keys = sigObj.keys(); NameValuePair[] nvps = new NameValuePair[sigObj.length()]; int i = 0; while (keys.hasNext()) { String key = keys.next(); nvps[i] = new NameValuePair(key, sigObj.optString(key, "")); i++; } return nvps; }
@SuppressWarnings("unchecked") public String showList() { String pageNo = servletRequest.getParameter("pageNo"); String holName = servletRequest.getParameter("holName"); String holLoginName = servletRequest.getParameter("holLoginName"); String deptName = servletRequest.getParameter("deptName"); if (StringUtils.isEmpty(pageNo)) { pageNo = "1"; } String key = null; String value = null; Map<String, Object> filter = new HashMap<String, Object>(); JSONObject obj = JSONObject.fromObject(this.holHoliday); Iterator it = obj.keys(); while (it.hasNext()) { key = (String) it.next(); value = this.servletRequest.getParameter(key); if (value != null && value.trim().length() > 0) { Object res = this.getValueByParamName(this.holHoliday, key); if (res != null) { filter.put(key, res); } } } if (StringUtils.isNotEmpty(holName)) { filter.put("holName", holName); servletRequest.setAttribute("holName", holName); } if (StringUtils.isNotEmpty(holLoginName)) { filter.put("holLoginName", holLoginName); servletRequest.setAttribute("holLoginName", holLoginName); } if (StringUtils.isNotEmpty(deptName)) { filter.put("deptName", deptName); servletRequest.setAttribute("deptName", deptName); } Page page = holHolidayService.getHoliday(filter, Integer.valueOf(pageNo), size); // if(page!=null && page.getResult()!=null){ // List<VUserdep> userList = new ArrayList<VUserdep>(); // List<HolHoliday> list = page.getResult(); // for(int i=0,length=list.size(); i<length; i++){ // VUserdep user = holHolidayService.findVUserdepById(Long.valueOf(list.get(i).getHolId())); // userList.add(user); // } // servletRequest.setAttribute("userList", userList); // } servletRequest.setAttribute("page", page); return SUCCESS; }
public static Map parserToMap(String s) { Map map = new HashMap(); JSONObject json = JSONObject.fromObject(s); Iterator keys = json.keys(); while (keys.hasNext()) { String key = (String) keys.next(); String value = json.get(key).toString(); if (value.startsWith("{") && value.endsWith("}")) { map.put(key, parserToMap(value)); } else { map.put(key, value); } } return map; }
/** * 从json HASH表达式中获取�?��map,改map支持嵌套功能 * * @param jsonString * @return */ public static Map getMap4Json(String jsonString) { JSONObject jsonObject = JSONObject.fromObject(jsonString); Iterator keyIter = jsonObject.keys(); String key; Object value; Map valueMap = new HashMap(); while (keyIter.hasNext()) { key = (String) keyIter.next(); value = jsonObject.get(key); valueMap.put(key, value); } return valueMap; }
/** * 通过json字符串初始化环境变量 格式: {var:value,var:value,.....} * * @param json */ public void initContextVarFromJson(String json) { JSONObject jsonObject = JSONObject.fromObject(json); for (Iterator iterator = jsonObject.keys(); iterator.hasNext(); ) { String key = (String) iterator.next(); Object obj = jsonObject.get(key); if (obj != null && obj instanceof JSONObject) { JSONObject jobj = (JSONObject) obj; if (jobj.isNullObject()) { obj = null; } else { // 日期型数据还原 if (jobj.get("time") != null) { obj = new Date(jobj.getLong("time")); } } } this.context.setVar(key, obj); } }
/** * 품목정보관리 저장, 수정 * * @param paramMap * @return List * @throws DaoException 2011. 4. 5. */ @SuppressWarnings("unchecked") public void saveItem(HashMap paramMap, HttpServletRequest request) throws DaoException { String itemCode = ""; try { /** *** session 정보 **** */ HashMap adminMap = (HashMap) request .getSession() .getAttribute(SGConfigManager.getString("common.session.admin.name")); // 날짜 형식에 "-"를 제거 String releaseDate = paramMap.get("release_date").toString(); releaseDate = releaseDate.replace("-", ""); paramMap.put("release_date", releaseDate); /** ******** 1. 품목관리 저장, 수정 Start ********* */ // flag값이 없으면 신규, 그렇지 않으면 저장 if (("R").equals(paramMap.get("flag"))) { // 수정 update("Item.updateItem", paramMap); } else { // 신규저장일 경우 품목코드를 생성 itemCode = queryForString("Item.createItemCode", paramMap); paramMap.put("item_code", itemCode); // 신규 저장 insert("Item.insertItem", paramMap); } /** ******** 2. 하드웨어 저장, 수정 ********* */ // 편집그리드의 내용을 받아서 처리하는부분 String recvJsonDataHw = (String) request.getParameter("hw_data"); JSONArray jsonArrayHw = JSONArray.fromObject(recvJsonDataHw); for (int i = 0; i < jsonArrayHw.size(); i++) { JSONObject jsonData = new JSONObject(); jsonData = jsonArrayHw.getJSONObject(i); HashMap<String, String> map = new HashMap<String, String>(); Iterator iter = jsonData.keys(); while (iter.hasNext()) { String key = (String) iter.next(); String value = jsonData.getString(key); map.put(key.toLowerCase(), value); } // session정보 설정 map.put("final_mod_id", (String) adminMap.get("ADMIN_ID")); // 신규입력이면 채번된 코드를 설정해준다. if (("").equals(paramMap.get("flag"))) { map.put("item_code", itemCode); } if ("I".equals(map.get("flag"))) { insert("ItemHW.insertItemHW", map); } else { update("ItemHW.updateItemHW", map); } } // End for /** ******** 3. 소프트웨어 저장, 수정 ********* */ // 편집그리드의 내용을 받아서 처리하는부분 String recvJsonDataSw = (String) request.getParameter("sw_data"); JSONArray jsonArraySw = JSONArray.fromObject(recvJsonDataSw); for (int i = 0; i < jsonArraySw.size(); i++) { JSONObject jsonData = new JSONObject(); jsonData = jsonArraySw.getJSONObject(i); HashMap<String, String> map = new HashMap<String, String>(); Iterator iter = jsonData.keys(); while (iter.hasNext()) { String key = (String) iter.next(); String value = jsonData.getString(key); map.put(key.toLowerCase(), value); } // session정보 설정 map.put("final_mod_id", (String) adminMap.get("ADMIN_ID")); // 신규입력이면 채번된 코드를 설정해준다. if (("").equals(paramMap.get("flag"))) { map.put("item_code", itemCode); } if ("I".equals(map.get("flag"))) { insert("ItemSW.insertItemSW", map); } else { update("ItemSW.updateItemSW", map); } } // End for /** ******** 4. 개발 담당자 저장, 수정 ********* */ // 편집그리드의 내용을 받아서 처리하는부분 String recvJsonData = (String) request.getParameter("dev_data"); JSONArray jsonArray = JSONArray.fromObject(recvJsonData); for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonData = new JSONObject(); jsonData = jsonArray.getJSONObject(i); HashMap<String, String> map = new HashMap<String, String>(); Iterator iter = jsonData.keys(); while (iter.hasNext()) { String key = (String) iter.next(); String value = jsonData.getString(key); map.put(key.toLowerCase(), value); } // session정보 설정 map.put("final_mod_id", (String) adminMap.get("ADMIN_ID")); // 신규입력이면 채번된 코드를 설정해준다. if (("").equals(paramMap.get("flag"))) { map.put("item_code", itemCode); } if ("I".equals(map.get("flag"))) { insert("ItemDeveloper.insertItemDeveloper", map); } else { update("ItemDeveloper.updateItemDeveloper", map); } } // End for } catch (Exception e) { logger.error(e, e); e.printStackTrace(); } }
public synchronized String hRJobStartItilAccount(String josnData) { Date currentDate = DateUtil.getCurrentDate(); String json = ""; JSONObject jsonObj = JSONObject.fromObject(josnData); UserInfo user = (UserInfo) baseBervice.findUnique(UserInfo.class, "userName", "admin"); String applyUserItCode = jsonObj.getString("applyUser"); UserInfo applyUser = (UserInfo) baseBervice.findUnique(UserInfo.class, "userName", applyUserItCode); // add by lee for 如果本地无审批人信息,直接去R3去人员信息 in 20100119 begin if (applyUser == null) { // SAPExecute sap=new SAPExecute(); // Map userMap=sap.getUserInfo(null, applyUserItCode.toUpperCase()); SenseServicesUitl ssUtil = new SenseServicesUitl(); Map userMap = ssUtil.getUserInfo(applyUserItCode.toUpperCase()); if (userMap.isEmpty()) json = "{success:false}"; else { userMap.put("password", "000000"); userMap.put("enabled", 1); userMap.put("isLock", 0); userMap.put("specialUser", 0); applyUser = (UserInfo) metaDataManager.saveEntityData(UserInfo.class, userMap); } } // add by lee for 如果本地无审批人信息,直接去R3去人员信息 in 20100119 end ServiceItemProcess serviceItemProcess = (ServiceItemProcess) baseBervice.find(ServiceItemProcess.class, "195"); AccountApplyMainTable aam = accountService.findUserApply(serviceItemProcess, applyUser, "0"); if (aam != null) { json = "{success:false}"; } else { // add by liuying at 20100302 for 验证是否存在可用的邮件和域账号 start List<PersonFormalAccount> accs = accountService.findAllPersonAccount(applyUser); if (!accs.isEmpty()) { for (PersonFormalAccount p : accs) { if (p.getAccountType().getAccountType().equals("DomainAccount") || p.getAccountType().getAccountType().equals("MailAccount")) { json = "{success:false}"; } } } if (!json.equals("{success:false}")) { // add by liuying at 20100302 for 验证是否存在可用的邮件和域账号 end String delegateApplyUserItCode = jsonObj.getString("delegateApplyUser"); // 代申请人信息 UserInfo delegateApplyUser = (UserInfo) baseBervice.findUnique( UserInfo.class, "itcode", delegateApplyUserItCode.toUpperCase()); // add by lee for 如果本地无审批人信息,直接去R3去人员信息 in 20100119 begin if (delegateApplyUser == null) { // SAPExecute sap=new SAPExecute(); // Map userMap=sap.getUserInfo(null, applyUserItCode.toUpperCase()); SenseServicesUitl ssUtil = new SenseServicesUitl(); Map userMap = ssUtil.getUserInfo(applyUserItCode.toUpperCase()); if (userMap.isEmpty()) json = "{success:false}"; else { userMap.put("password", "000000"); userMap.put("enabled", 1); userMap.put("isLock", 0); userMap.put("specialUser", 0); delegateApplyUser = (UserInfo) metaDataManager.saveEntityData(UserInfo.class, userMap); } } // add by lee for 如果本地无审批人信息,直接去R3去人员信息 in 20100119 end String sameEmailDept = jsonObj.getString("sameEmailDept"); SameMailDept dept = (SameMailDept) baseBervice.findUnique(SameMailDept.class, "id", Long.valueOf(sameEmailDept)); String workSpace = jsonObj.getString("workSpace"); WorkSpace workSpaces = (WorkSpace) baseBervice.findUnique(WorkSpace.class, "id", Long.valueOf(workSpace)); String mailServer = workSpaces.getMailServer(); MailServer ms = (MailServer) baseBervice.findUnique(MailServer.class, "name", mailServer); applyUser.setWorkSpace(workSpaces); applyUser.setSameMailDept(dept); applyUser.setMailServer(ms); Object us = baseBervice.save(applyUser); Map mainMap = new HashMap(); mainMap.put("createDate", currentDate); mainMap.put("createUser", delegateApplyUser); mainMap.put("applyUser", applyUser); if (applyUser.getTelephone() != null) { mainMap.put("applyUserTel", applyUser.getTelephone()); } mainMap.put("applyDate", currentDate); mainMap.put("delegateApplyUser", delegateApplyUser); if (delegateApplyUser.getTelephone() != null) { mainMap.put("delegateApplyTel", delegateApplyUser.getTelephone()); } mainMap.put("processType", 0); mainMap.put("status", Constants.STATUS_DRAFT); mainMap.put("serviceItemProcess", 195); mainMap.put("serviceItem", 301); // mainMap.put("name", "AC-0000001884"); SystemMainTable msmts = systemMainTableService.findSystemMainTableByClazz( AccountApplyMainTable.class); // 获取被关联表 String msmtNames = msmts.getTableName(); // 获取被关联表英文表名 Class accountApply = this.toClass(msmts.getClassName()); BaseObject mainObject = (BaseObject) metaDataManager.saveEntityDataForUser(accountApply, mainMap, user); // 保存被关联主实体 /** * *******************************保存HR招聘单触发帐号实体START************************************************* */ SystemMainTable msmt = systemMainTableService.findSystemMainTableByClazz(PersonFormalAccount.class); // 获取被关联表 String msmtName = msmt.getTableName(); // 获取被关联表英文表名 Class account = this.toClass(msmt.getClassName()); Map temp = new HashMap(); Map domain = new HashMap(); Map www = new HashMap(); Map telephone = new HashMap(); String mailValue = jsonObj.getString("mailValue"); MailVolume mv = (MailVolume) baseBervice.findUnique(MailVolume.class, "value", Integer.parseInt(mailValue)); String mailRemark = jsonObj.getString("mailRemark"); temp.put("accountState", "0"); temp.put("applyId", mainObject); temp.put("accountType", "2"); temp.put("mailValue", mv.getId()); temp.put("department", applyUser.getDepartment()); temp.put("remarkDesc", mailRemark); temp.put("accountowner", applyUser); temp.put("mailServer", mailServer); temp.put("workSpace", workSpace); temp.put("costCenterCode", applyUser.getCostCenterCode()); temp.put("sameMailDept", sameEmailDept); domain.put("accountState", "0"); domain.put("applyId", mainObject); domain.put("department", applyUser.getDepartment()); domain.put("accountType", "1"); domain.put("accountowner", applyUser); domain.put("mailServer", mailServer); domain.put("sameMailDept", sameEmailDept); domain.put("costCenterCode", applyUser.getCostCenterCode()); domain.put("workSpace", workSpace); BaseObject object = (BaseObject) metaDataManager.saveEntityData(account, temp); // 保存关联实体 BaseObject domianObject = (BaseObject) metaDataManager.saveEntityData(account, domain); // 保存关联实体 String wwwFlag = jsonObj.getString("wwwFlag"); if (wwwFlag.equals("1")) { String wwwValue = jsonObj.getString("wwwValue"); WWWScanType wwws = (WWWScanType) baseBervice.findUnique(WWWScanType.class, "value", Integer.parseInt(wwwValue)); String wwwRemark = jsonObj.getString("wwwRemark"); www.put("accountState", "0"); www.put("applyId", mainObject); www.put("accountType", "3"); www.put("department", applyUser.getDepartment()); www.put("accountowner", applyUser); www.put("wwwAccountValue", wwws.getId()); www.put("applyReason", wwwRemark); www.put("mailServer", mailServer); www.put("sameMailDept", sameEmailDept); www.put("costCenterCode", applyUser.getCostCenterCode()); www.put("workSpace", workSpace); BaseObject wwwObject = (BaseObject) metaDataManager.saveEntityData(account, www); // 保存关联实体 } String telephoneFlag = jsonObj.getString("telephoneFlag"); if (telephoneFlag.equals("1")) { String telephoneType = jsonObj.getString("telephoneType"); String stationNumber = jsonObj.getString("stationNumber"); Double yearMoney = jsonObj.getDouble("yearMoney"); telephone.put("accountState", "0"); telephone.put("applyId", mainObject); telephone.put("accountType", "15"); telephone.put("accountowner", applyUser); telephone.put("department", applyUser.getDepartment()); telephone.put("yearMoney", yearMoney); telephone.put("telephoneType", telephoneType); telephone.put("stationNumber", stationNumber); telephone.put("mailServer", mailServer); telephone.put("sameMailDept", sameEmailDept); telephone.put("workSpace", workSpace); telephone.put("costCenterCode", applyUser.getCostCenterCode()); BaseObject telephoneObject = (BaseObject) metaDataManager.saveEntityData(account, telephone); // 保存关联实体 } String definitionName = "AR_NewITAccountApply1255086207953"; List<TelephoneAudit> audit = baseBervice.find(TelephoneAudit.class, "workSpace", workSpaces.getName()); String accountManger = ""; if (audit != null) { for (TelephoneAudit te : audit) { accountManger = te.getAuditManger(); } } Map<String, String> mapBizz = new HashMap<String, String>(); String buzzParameters = "{dataId :'" + mainObject.getId() + "',applyId : '" + mainObject.getId() + "',accountName:'" + mainObject.getName() + "',applyType: 'acproject'," + "applyTypeName: '新员工IT帐号申请'," + "customer:'',serviceItemId:'" + "301" + "'}"; if (buzzParameters != null && !buzzParameters.equals("")) { JSONObject jo = JSONObject.fromObject(buzzParameters); Iterator it = jo.keys(); while (it.hasNext()) { String key = (String) it.next(); String value = (String) jo.get(key); mapBizz.put(key, value); } } mapBizz.put( "workflowHistory", "com.digitalchina.itil.service.entity.ServiceItemApplyAuditHis"); String serviceItemId = mapBizz.get("serviceItemId"); ServiceItem servcieItem = (ServiceItem) baseBervice.find(ServiceItem.class, serviceItemId); ServiceItemUserTable siut = (ServiceItemUserTable) baseBervice.findUnique(ServiceItemUserTable.class, "serviceItem", servcieItem); String className = siut.getClassName(); Object obj = baseBervice.find(this.toClass(className), mainObject.getId().toString()); BeanWrapper bWrapper = new BeanWrapperImpl(obj); mapBizz.put("applyNum", mainObject.getName()); mapBizz.put("applyName", mainObject.getName()); mapBizz.put("hrJob", "true"); String dynCounterSignStr = "confirmByAM:"; AccountApplyMainTable mainObj = (AccountApplyMainTable) baseBervice.find( AccountApplyMainTable.class, mainObject.getId().toString(), true); // 得到面板主实体 List<PersonFormalAccount> accounts = baseBervice.find(PersonFormalAccount.class, "applyId", mainObj); for (PersonFormalAccount acc : accounts) { Long at = acc.getAccountType().getId(); AccountType ac = (AccountType) baseBervice.findUnique(AccountType.class, "id", at); // AccountType ac=acc.getAccountType(); if (ac.getAccountType().equals("Telephone")) { dynCounterSignStr += "1" + "+"; dynCounterSignStr += accountManger; String type = "&" + ac.getName() + "管理员处理"; dynCounterSignStr += type; dynCounterSignStr += ";"; } else { // Role role=ac.getRole(); // Set<UserInfo> userinfos=role.getUserInfos(); Long roles = ac.getRole().getId(); Role role = (Role) baseBervice.findUnique(Role.class, "id", roles); List<UserRole> userRole = baseBervice.find(UserRole.class, "role", role); List<UserInfo> userinfos = new ArrayList(); for (UserRole ur : userRole) { userinfos.add(ur.getUserInfo()); } if (userinfos.size() > 1) { dynCounterSignStr += "1" + "+"; for (UserInfo userinfo : userinfos) { dynCounterSignStr += userinfo.getUserName() + ","; } dynCounterSignStr = dynCounterSignStr.substring(0, dynCounterSignStr.length() - 1); String type = "&" + ac.getName() + "管理员处理"; dynCounterSignStr += type; dynCounterSignStr += ";"; } else { for (UserInfo userinfo : userinfos) { dynCounterSignStr += "1" + "+" + userinfo.getUserName(); } String type = "&" + ac.getName() + "管理员处理"; dynCounterSignStr += type; dynCounterSignStr += ";"; } } } if (dynCounterSignStr.endsWith(";")) { dynCounterSignStr = dynCounterSignStr.substring(0, dynCounterSignStr.length() - 1); } mapBizz.put("dynCounterSign", dynCounterSignStr); // 放入流程参数中 String creator = applyUser.getUserName(); Long instanceId = null; String meg = ""; try { instanceId = ps.createProcess(definitionName, creator, mapBizz); json = "{success:true}"; } catch (Exception e) { meg = e.getMessage(); json = "{success:true,Exception:'" + meg + "'}"; } } } return json; }