本文整理了Java中flexjson.JSONSerializer.serialize()
方法的一些代码示例,展示了JSONSerializer.serialize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSONSerializer.serialize()
方法的具体详情如下:
包路径:flexjson.JSONSerializer
类名称:JSONSerializer
方法名:serialize
[英]This performs a shallow serialization of the target instance. It uses a StringBuilder to write output to.
[中]这将对目标实例执行浅层序列化。它使用StringBuilder将输出写入。
代码示例来源:origin: spring-projects/spring-integration-samples
public String toJson() {
return new JSONSerializer().exclude("*.class").serialize(this);
}
代码示例来源:origin: spring-projects/spring-integration-samples
public static String toJsonArray(Collection<LoanShark> collection) {
return new JSONSerializer().exclude("*.class").serialize(collection);
}
代码示例来源:origin: dragome/dragome-sdk
/**
* This performs a shallow serialization of the target instance and
* passes the generated JSON into the provided OutputHandler.
*
* @param target - the instance to serialize to JSON
* @param out - OutputHandler to write output to
* @return returns JSON as a String
*/
public String serialize(Object target, OutputHandler out)
{
return serialize(target, SerializationType.SHALLOW, out);
}
代码示例来源: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 toJson.
* @return String
*/
public final String toJson() {
return new JSONSerializer().exclude("*.class").serialize(this);
}
代码示例来源:origin: Medisana/vitadock-api
/**
* Method toJsonArray.
* @param collection Collection<String>
* @return String
*/
public static String toJsonArray(final Collection<String> collection) {
return new JSONSerializer().exclude("*.class").serialize(collection);
}
代码示例来源: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 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<TrackerActivityEntry>
* @return String
*/
public static final String toJsonArray(
final Collection<TrackerActivityEntry> collection) {
return new JSONSerializer().exclude("*.class").exclude("uuid")
.serialize(collection);
}
代码示例来源:origin: Medisana/vitadock-api
/**
* Method toJsonArray.
* @param collection Collection<Thermodock>
* @return String
*/
public static final String toJsonArray(
final Collection<Thermodock> 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<com.medisanaspace.model.TrackerPhase>
* @return String
*/
public static String toJsonArray(
Collection<com.medisanaspace.model.TrackerPhase> 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<Cardiodock>
* @return String
*/
public static final String toJsonArray(
final Collection<Cardiodock> 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<UserSettings>
* @return String
*/
public static final String toJsonArray(
final Collection<UserSettings> 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: Medisana/vitadock-api
/**
* Method toJsonArray.
* @param collection Collection<TrackerSleep>
* @return String
*/
public static final String toJsonArray(
final Collection<TrackerSleep> collection) {
return new JSONSerializer().include("trackerSleepQualities").exclude("*.class")
.exclude("active").exclude("updatedDate").exclude("version")
.exclude("uuid").serialize(collection);
}
代码示例来源:origin: Medisana/vitadock-api
/**
* Method toJsonArray.
* @param collection Collection<Activitydock>
* @return String
*/
public static final String toJsonArray(final Collection<Activitydock> collection) {
return new JSONSerializer().include("activities", "distances")
.exclude("*.class").exclude("active").exclude("updatedDate")
.exclude("version").exclude("id").serialize(collection);
}
代码示例来源:origin: Medisana/vitadock-api
/**
* Method toJsonArray.
* @param collection Collection<TrackerActivity>
* @return String
*/
public static final String toJsonArray(
final Collection<TrackerActivity> collection) {
return new JSONSerializer().include("trackerActivityEntries")
.exclude("*.class").exclude("active").exclude("updatedDate")
.exclude("version").exclude("uuid").serialize(collection);
}
内容来源于网络,如有侵权,请联系作者删除!