本文整理汇总了Java中com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL属性的典型用法代码示例。如果您正苦于以下问题:Java Inclusion.NON_NULL属性的具体用法?Java Inclusion.NON_NULL怎么用?Java Inclusion.NON_NULL使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion
的用法示例。
在下文中一共展示了Inclusion.NON_NULL属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getObjectName
@JsonSerialize(include = Inclusion.NON_NULL)
public String getObjectName() {
if ( dataName != null ) {
return dataName;
}
if ( entities != null ) {
return "entities";
}
if ( ids != null ) {
return "ids";
}
if ( entity != null ) {
return "entity";
}
if ( id != null ) {
return "id";
}
return null;
}
示例2: success
/**
* 返回日期处理成功结果
* @param data 数据节点对象
* @return JSON结果
*/
public static String success(Object data, String format)
{
Map<String, Object> map = new HashMap<String, Object>();
map.put("code", GlobalResultStatus.SUCCESS.getCode());
if (data != null)
{
map.put("data", data);
}
JsonMapper mapper = new JsonMapper(Inclusion.NON_NULL, new SimpleDateFormat(format));
return mapper.toJson(map);
}
示例3: getIdSet
@JsonSerialize(include = Inclusion.NON_NULL)
public Set<UUID> getIdSet() {
if ( idSet != null ) {
return idSet;
}
getIds();
if ( ids != null ) {
idSet = new LinkedHashSet<UUID>();
idSet.addAll( ids );
return idSet;
}
return new LinkedHashSet<UUID>();
}
示例4: JsonMapper
public JsonMapper()
{
this(Inclusion.NON_NULL, null, false);
}
示例5: buildNonNullMapper
/**
* 创建只输出非空属性到Json字符串的Mapper.
*/
public static JsonMapper buildNonNullMapper()
{
return new JsonMapper(Inclusion.NON_NULL);
}
示例6: reportSuccess
/**
* 报表返回格式日期处理成功结果
* @param data 数据节点对象
* @return JSON结果
*/
public static String reportSuccess(Object data, String format)
{
JsonMapper mapper = new JsonMapper(Inclusion.NON_NULL, new SimpleDateFormat(format));
return mapper.toJson(data);
}
示例7: getLast
@JsonSerialize(include = Inclusion.NON_NULL)
public UUID getLast() {
return last;
}
示例8: getGroup
@JsonSerialize(include = Inclusion.NON_NULL)
public UUID getGroup() {
return group;
}
示例9: getCategory
@JsonSerialize(include = Inclusion.NON_NULL)
public String getCategory() {
return category;
}
示例10: getDisabled
@JsonSerialize(include = Inclusion.NON_NULL)
public Boolean getDisabled() {
return disabled;
}
示例11: getRolenames
@JsonSerialize(include = Inclusion.NON_NULL)
public Map<String, String> getRolenames() {
return rolenames;
}
示例12: getRegistrationRequiresAdminApproval
@JsonSerialize(include = Inclusion.NON_NULL)
@JsonProperty("registration_requires_admin_approval")
public Boolean getRegistrationRequiresAdminApproval() {
return registrationRequiresAdminApproval;
}
示例13: getNotifyAdminOfNewUsers
@JsonSerialize(include = Inclusion.NON_NULL)
@JsonProperty("notify_admin_of_new_users")
public Boolean getNotifyAdminOfNewUsers() {
return notifyAdminOfNewUsers;
}
示例14: getOauthproviders
@JsonSerialize(include = Inclusion.NON_NULL)
public Map<String, OAuthProvider> getOauthproviders() {
return oauthproviders;
}
示例15: getClientId
@JsonSerialize(include = Inclusion.NON_NULL)
public String getClientId() {
return clientId;
}