flexjson.JSONSerializer.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(110)

本文整理了Java中flexjson.JSONSerializer.<init>()方法的一些代码示例,展示了JSONSerializer.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSONSerializer.<init>()方法的具体详情如下:
包路径:flexjson.JSONSerializer
类名称:JSONSerializer
方法名:<init>

JSONSerializer.<init>介绍

暂无

代码示例

代码示例来源:origin: spring-projects/spring-integration-samples

public static String toJsonArray(Collection<LoanShark> collection) {
  return new JSONSerializer().exclude("*.class").serialize(collection);
}

代码示例来源:origin: spring-projects/spring-integration-samples

public String toJson() {
  return new JSONSerializer().exclude("*.class").serialize(this);
}

代码示例来源:origin: magro/memcached-session-manager

/**
 * Constructor
 * @param manager
 */
public JSONTranscoder(final Manager manager) {
  serializer = new JSONSerializer();
  deserializer = new JSONDeserializer<ConcurrentMap<String, Object>>();
  if (LOG.isDebugEnabled()) {
    LOG.debug("Initialized json serializer");
  }
}

代码示例来源:origin: fabienrenaud/java-json-benchmark

@Override
  protected JSONSerializer initialValue() {
    return new JSONSerializer();
  }
};

代码示例来源:origin: pentaho/data-access

@Override
public void writeTo( IDatabaseTypesList t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType,
           MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream ) throws IOException, WebApplicationException {
 OutputStreamWriter outputStreamWriter = new OutputStreamWriter( entityStream );
 try {
  new JSONSerializer().exclude( "*.class" ).deepSerialize( t, outputStreamWriter );
 } finally {
  outputStreamWriter.close();
 }
}

代码示例来源:origin: pentaho/data-access

@Override
public void writeTo( DatabaseConnection t, Class<?> type, Type genericType, Annotation[] annotations,
           MediaType mediaType,
           MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream )
 throws IOException, WebApplicationException {
 OutputStreamWriter outputStreamWriter = new OutputStreamWriter( entityStream );
 try {
  new JSONSerializer().exclude( "*.class" ).serialize( t, outputStreamWriter );
 } finally {
  outputStreamWriter.close();
 }
}

代码示例来源:origin: org.motechproject/motech-server-core

@Override
  public String toString() {
    return new JSONSerializer().exclude("childLocations").serialize(this).replaceAll("\"","'");
  }
}

代码示例来源:origin: Medisana/vitadock-api

/**
 * Method toJson.
 * @return String
 */
public final String toJson() {
  return new JSONSerializer().exclude("*.class").serialize(this);
}

代码示例来源:origin: Medisana/vitadock-api

/**
 * Method toJson.
 * @return String
 */
public final String toJson() {
  return new JSONSerializer().exclude("*.class").serialize(this);
}

代码示例来源:origin: Medisana/vitadock-api

/**
 * Method toJson.
 * @return String
 */
public final String toJson() {
  return new JSONSerializer().exclude("*.class").serialize(this);
}

代码示例来源:origin: Medisana/vitadock-api

/**
 * Method toJsonArray.
 * @param collection Collection<Activity>
 * @return String
 */
public static final String toJsonArray(final Collection<Activity> collection) {
  return new JSONSerializer().exclude("*.class").serialize(collection);
}

代码示例来源:origin: Medisana/vitadock-api

/**
 * Method toJson.
 * @return String
 */
public String toJson() {
  return new JSONSerializer().exclude("*.class").serialize(this);
}

代码示例来源:origin: Medisana/vitadock-api

/**
 * Method toJsonArray.
 * @param collection Collection<Distance>
 * @return String
 */
public static final String toJsonArray(final Collection<Distance> collection) {
  return new JSONSerializer().exclude("*.class").serialize(collection);
}

代码示例来源:origin: Medisana/vitadock-api

/**
 * Method toJsonArray.
 * @param collection Collection<TrackerSleepQuality>
 * @return String
 */
public static final String toJsonArray(
    final Collection<TrackerSleepQuality> collection) {
  return new JSONSerializer().exclude("*.class").exclude("uuid")
      .serialize(collection);
}

代码示例来源:origin: Medisana/vitadock-api

/**
 * Method toJsonArray.
 * @param collection Collection<Glucodockglucose>
 * @return String
 */
public static final String toJsonArray(
    final Collection<Glucodockglucose> collection) {
  return new JSONSerializer().exclude("*.class").exclude("active")
      .exclude("updatedDate").exclude("version").exclude("id")
      .serialize(collection);
}

代码示例来源:origin: dragome/dragome-sdk

private JSONSerializer createSerializer()
{
  jsonSerializer= new JSONSerializer();
  jsonSerializer.transform(new ElementTrasformer(), Element.class);
  jsonSerializer.transform(new MethodTrasformer(), Method.class);
  jsonSerializer.transform(new DragomeClassTransformer(), Class.class);
  return jsonSerializer;
}

代码示例来源:origin: Medisana/vitadock-api

/**
 * Method toJsonArray.
 * @param collection Collection<Targetscale>
 * @return String
 */
public static final String toJsonArray(
    final Collection<Targetscale> collection) {
  return new JSONSerializer().exclude("*.class").exclude("active")
      .exclude("updatedDate").exclude("version").exclude("id")
      .serialize(collection);
}

代码示例来源:origin: Medisana/vitadock-api

/**
 * Method toJsonArray.
 * @param collection Collection<Glucodockmeal>
 * @return String
 */
public static final String toJsonArray(
    final Collection<Glucodockmeal> collection) {
  return new JSONSerializer().exclude("*.class").exclude("active")
      .exclude("updatedDate").exclude("version").exclude("id")
      .serialize(collection);
}

代码示例来源:origin: Medisana/vitadock-api

/**
 * Method toJsonArray.
 * @param collection Collection<Glucodockinsulin>
 * @return String
 */
public static String toJsonArray(
    final Collection<Glucodockinsulin> collection) {
  return new JSONSerializer().exclude("*.class").exclude("active")
      .exclude("updatedDate").exclude("version").exclude("id")
      .serialize(collection);
}

代码示例来源:origin: com.googlecode.mycontainer/mycontainer-commons

public JsonHandler() {
  this.serializer = new JSONSerializer();
  deserializer = new JSONDeserializer<Object>();
  serializer.transform(new CharacterTransformer(), CharSequence.class);
  serializer.transform(new IterableTransformer(), List.class);
  serializer.transform(new MapTransformer(), Map.class);
}

相关文章