Examples of registerJsonValueProcessor()


Examples of net.sf.json.JsonConfig.registerJsonValueProcessor()

  private static JsonConfig filterConfig() {
    JsonConfig config = new JsonConfig();
    JsonValueProcessor jp = new DateJsonValueProcessor(
        "yyyy-MM-dd HH:mm:ss");
    config.registerJsonValueProcessor(java.sql.Timestamp.class, jp);
    return config;
  }

  // �����ƹ�������
  private static class NamedPropertyFilter implements PropertyFilter {
View Full Code Here

Examples of net.sf.json.JsonConfig.registerJsonValueProcessor()

    String jsonString = "[]";
    if (G4Utils.isEmpty(pObject)) {
      // log.warn("传入的Java对象为空,不能将其序列化为Json资料格式.请检查!");
    } else {
      JsonConfig cfg = new JsonConfig();
      cfg.registerJsonValueProcessor(java.sql.Timestamp.class, new JsonValueProcessorImpl(pFormatString));
      cfg.registerJsonValueProcessor(java.util.Date.class, new JsonValueProcessorImpl(pFormatString));
      cfg.registerJsonValueProcessor(java.sql.Date.class, new JsonValueProcessorImpl(pFormatString));
      if (pObject instanceof ArrayList) {
        JSONArray jsonArray = JSONArray.fromObject(pObject, cfg);
        jsonString = jsonArray.toString();
View Full Code Here

Examples of net.sf.json.JsonConfig.registerJsonValueProcessor()

    if (G4Utils.isEmpty(pObject)) {
      // log.warn("传入的Java对象为空,不能将其序列化为Json资料格式.请检查!");
    } else {
      JsonConfig cfg = new JsonConfig();
      cfg.registerJsonValueProcessor(java.sql.Timestamp.class, new JsonValueProcessorImpl(pFormatString));
      cfg.registerJsonValueProcessor(java.util.Date.class, new JsonValueProcessorImpl(pFormatString));
      cfg.registerJsonValueProcessor(java.sql.Date.class, new JsonValueProcessorImpl(pFormatString));
      if (pObject instanceof ArrayList) {
        JSONArray jsonArray = JSONArray.fromObject(pObject, cfg);
        jsonString = jsonArray.toString();
      } else {
View Full Code Here

Examples of net.sf.json.JsonConfig.registerJsonValueProcessor()

      // log.warn("传入的Java对象为空,不能将其序列化为Json资料格式.请检查!");
    } else {
      JsonConfig cfg = new JsonConfig();
      cfg.registerJsonValueProcessor(java.sql.Timestamp.class, new JsonValueProcessorImpl(pFormatString));
      cfg.registerJsonValueProcessor(java.util.Date.class, new JsonValueProcessorImpl(pFormatString));
      cfg.registerJsonValueProcessor(java.sql.Date.class, new JsonValueProcessorImpl(pFormatString));
      if (pObject instanceof ArrayList) {
        JSONArray jsonArray = JSONArray.fromObject(pObject, cfg);
        jsonString = jsonArray.toString();
      } else {
        JSONObject jsonObject = JSONObject.fromObject(pObject, cfg);
View Full Code Here

Examples of net.sf.json.JsonConfig.registerJsonValueProcessor()

    }
  }

  public static JsonConfig createDefaultConfig(ERXRestContext context) {
    JsonConfig config = new JsonConfig();
    config.registerJsonValueProcessor(NSTimestamp.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(LocalDate.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(LocalDateTime.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(Date.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(NSData.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(ERXCryptoString.class, new GeneralObjectToStringProcessor(context));
View Full Code Here

Examples of net.sf.json.JsonConfig.registerJsonValueProcessor()

  }

  public static JsonConfig createDefaultConfig(ERXRestContext context) {
    JsonConfig config = new JsonConfig();
    config.registerJsonValueProcessor(NSTimestamp.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(LocalDate.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(LocalDateTime.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(Date.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(NSData.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(ERXCryptoString.class, new GeneralObjectToStringProcessor(context));
    config.setJsonValueProcessorMatcher(new ERXRestValueProcessorMatcher());
View Full Code Here

Examples of net.sf.json.JsonConfig.registerJsonValueProcessor()

  public static JsonConfig createDefaultConfig(ERXRestContext context) {
    JsonConfig config = new JsonConfig();
    config.registerJsonValueProcessor(NSTimestamp.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(LocalDate.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(LocalDateTime.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(Date.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(NSData.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(ERXCryptoString.class, new GeneralObjectToStringProcessor(context));
    config.setJsonValueProcessorMatcher(new ERXRestValueProcessorMatcher());
    return config;
View Full Code Here

Examples of net.sf.json.JsonConfig.registerJsonValueProcessor()

  public static JsonConfig createDefaultConfig(ERXRestContext context) {
    JsonConfig config = new JsonConfig();
    config.registerJsonValueProcessor(NSTimestamp.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(LocalDate.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(LocalDateTime.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(Date.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(NSData.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(ERXCryptoString.class, new GeneralObjectToStringProcessor(context));
    config.setJsonValueProcessorMatcher(new ERXRestValueProcessorMatcher());
    return config;
  }
View Full Code Here

Examples of net.sf.json.JsonConfig.registerJsonValueProcessor()

    JsonConfig config = new JsonConfig();
    config.registerJsonValueProcessor(NSTimestamp.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(LocalDate.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(LocalDateTime.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(Date.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(NSData.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(ERXCryptoString.class, new GeneralObjectToStringProcessor(context));
    config.setJsonValueProcessorMatcher(new ERXRestValueProcessorMatcher());
    return config;
  }
View Full Code Here

Examples of net.sf.json.JsonConfig.registerJsonValueProcessor()

    config.registerJsonValueProcessor(NSTimestamp.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(LocalDate.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(LocalDateTime.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(Date.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(NSData.class, new GeneralObjectToStringProcessor(context));
    config.registerJsonValueProcessor(ERXCryptoString.class, new GeneralObjectToStringProcessor(context));
    config.setJsonValueProcessorMatcher(new ERXRestValueProcessorMatcher());
    return config;
  }

}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.