@Test public void mapToJsonBeanTest() throws JsonProcessingException { ObjectMapper mapper = new ObjectMapper(); SimpleOutputBean bean = new SimpleOutputBean(); bean.setC(50); String jsonBeanExcpected = mapper.writeValueAsString(bean); Map<String,Object> map = new HashMap<>(); map.put("c", 50); map.put("#update-count-1",0); String jsonBeanActual = JSONBeanUtil.mapToJSONBean(map); Assert.assertEquals(jsonBeanExcpected, jsonBeanActual); }
public static String mapToJSONBean(final Map<String,Object> map) { final JSONObject obj = new JSONObject(); for (String key : map.keySet()) { if (! key.startsWith("#")) { obj.put(key, map.get(key)); } } return obj.toString(); }
JSONBeanUtil { public static String mapToJSONBean(final Map<String,Object> map) { final JSONObject obj = new JSONObject(); for (String key : map.keySet()) { if (! key.startsWith("#")) { obj.put(key, map.get(key)); } } return obj.toString(); } }
JSONBeanUtil { public static String mapToJSONBean(final Map<String,Object> map) { final JSONObject obj = new JSONObject(); for (String key : map.keySet()) { if (! key.startsWith("#")) { obj.put(key, map.get(key)); } } return obj.toString(); }  }
JSONBeanUtil { public static String mapToJSONBean(final Map<String,Object> map) { final JSONObject obj = new JSONObject(); for (String key : map.keySet()) { if (! key.startsWith("#")) { obj.put(key, map.get(key)); } } return obj.toString(); }  static Properties parsePropertiesFromJSONBean(final String json); static String mapToJSONBean(final Map<String,Object> map); }
JSONBeanUtil { public static String mapToJSONBean(final Map<String,Object> map) { final JSONObject obj = new JSONObject(); for (String key : map.keySet()) { if (! key.startsWith("#")) { obj.put(key, map.get(key)); } } return obj.toString(); }  static Properties parsePropertiesFromJSONBean(final String json); static String mapToJSONBean(final Map<String,Object> map);  }