本文整理汇总了Java中com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_EMPTY属性的典型用法代码示例。如果您正苦于以下问题:Java Inclusion.NON_EMPTY属性的具体用法?Java Inclusion.NON_EMPTY怎么用?Java Inclusion.NON_EMPTY使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion
的用法示例。
在下文中一共展示了Inclusion.NON_EMPTY属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildNonEmptyMapper
/**
* 创建只输出非Null且非Empty(如List.isEmpty)的属性到Json字符串的Mapper.
*/
public static JsonMapper buildNonEmptyMapper()
{
return new JsonMapper(Inclusion.NON_EMPTY);
}
示例2: getRetentionSettings
@ApiModelProperty("Retention settings for metrics, expressed in days")
@JsonProperty("retentions")
@JsonSerialize(include = Inclusion.NON_EMPTY, keyUsing = MetricTypeKeySerializer.class)
public Map<MetricType<?>, Integer> getRetentionSettings() {
return retentionSettings;
}
示例3: getTags
@ApiModelProperty("Metric tags")
@JsonSerialize(include = Inclusion.NON_EMPTY)
public Map<String, String> getTags() {
return tags;
}
示例4: getDataPoints
@ApiModelProperty("Metric data points")
@JsonSerialize(include = Inclusion.NON_EMPTY)
public List<DataPoint<T>> getDataPoints() {
return dataPoints;
}
示例5: getMinTimestamp
@ApiModelProperty("Timestamp of the metric's oldest data point")
@JsonSerialize(include = Inclusion.NON_EMPTY)
public Long getMinTimestamp() {
return minTimestamp;
}
示例6: getMaxTimestamp
@ApiModelProperty("Timestamp of the metric's most recent data point")
@JsonSerialize(include = Inclusion.NON_EMPTY)
public Long getMaxTimestamp() {
return maxTimestamp;
}