@Test public void mapToJson() { String objectToJson = jsonlib.toJSONString(map); System.out.println(objectToJson); }
public String toJSONString(Object bean){ jsonConfig = getJsonConfig(); if(bean.getClass().isArray() || bean instanceof Collection){ return arrayToJson(bean); }else{ return objectToJson(bean); } }
JsonLib implements Jsonable { public String toJSONString(Object bean){ jsonConfig = getJsonConfig(); if(bean.getClass().isArray() || bean instanceof Collection){ return arrayToJson(bean); }else{ return objectToJson(bean); } } }
JsonLib implements Jsonable { public String toJSONString(Object bean){ jsonConfig = getJsonConfig(); if(bean.getClass().isArray() || bean instanceof Collection){ return arrayToJson(bean); }else{ return objectToJson(bean); } }  }
JsonLib implements Jsonable { public String toJSONString(Object bean){ jsonConfig = getJsonConfig(); if(bean.getClass().isArray() || bean instanceof Collection){ return arrayToJson(bean); }else{ return objectToJson(bean); } }  String toJSONString(Object bean); @SuppressWarnings("unchecked") @Override T toBean(String json, Class<T> beanClass); @SuppressWarnings("unchecked") @Override List<T> toList(String json, Class<T> beanClass); @Override void setDatePattern(String datePattern); @Override void setExcludes(String[] excludes); @Override com.alibaba.fastjson.JSONObject toJSON(Object bean); @Override com.alibaba.fastjson.JSONArray toJSONArray(Object bean); }
JsonLib implements Jsonable { public String toJSONString(Object bean){ jsonConfig = getJsonConfig(); if(bean.getClass().isArray() || bean instanceof Collection){ return arrayToJson(bean); }else{ return objectToJson(bean); } }  String toJSONString(Object bean); @SuppressWarnings("unchecked") @Override T toBean(String json, Class<T> beanClass); @SuppressWarnings("unchecked") @Override List<T> toList(String json, Class<T> beanClass); @Override void setDatePattern(String datePattern); @Override void setExcludes(String[] excludes); @Override com.alibaba.fastjson.JSONObject toJSON(Object bean); @Override com.alibaba.fastjson.JSONArray toJSONArray(Object bean);  }