Java Code Examples for com.fasterxml.jackson.annotation.JsonInclude.Include#NON_NULL
The following examples show how to use
com.fasterxml.jackson.annotation.JsonInclude.Include#NON_NULL .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RawKeyStdSerializer.java From gwt-jackson with Apache License 2.0 | 6 votes |
@Override public void serialize( Key value, JsonGenerator jgen, SerializerProvider provider ) throws IOException { jgen.writeStartObject(); boolean includeNull = Include.NON_NULL != provider.getConfig().getDefaultPropertyInclusion().getValueInclusion(); if ( value.getParent() != null || includeNull ) { jgen.writeObjectField( RawKeyConstant.PARENT, value.getParent() ); } if ( value.getKind() != null || includeNull ) { jgen.writeStringField( RawKeyConstant.KIND, value.getKind() ); } jgen.writeNumberField( RawKeyConstant.ID, value.getId() ); if ( value.getName() != null || includeNull ) { jgen.writeStringField( RawKeyConstant.NAME, value.getName() ); } jgen.writeEndObject(); }
Example 2
Source File: ErrorResponse.java From authlib-agent with MIT License | 4 votes |
@JsonInclude(Include.NON_NULL) @XmlElement public String getStacktrace() { return stacktrace; }
Example 3
Source File: ErrorInfo.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@JsonInclude(Include.NON_NULL) public String getMessageKey() { return messageKey; }
Example 4
Source File: RestVariable.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@JsonInclude(Include.NON_NULL) public String getValueUrl() { return valueUrl; }
Example 5
Source File: JacksonXmlMapper.java From onetwo with Apache License 2.0 | 4 votes |
public static JacksonXmlMapper ignoreNull(){ JacksonXmlMapper jsonm = new JacksonXmlMapper(Include.NON_NULL); return jsonm; }
Example 6
Source File: RelatedContentRepresentation.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@JsonInclude(Include.NON_NULL) public String getLinkUrl() { return linkUrl; }
Example 7
Source File: RelatedContentRepresentation.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@JsonInclude(Include.NON_NULL) public String getSimpleType() { return simpleType; }
Example 8
Source File: HttpProxyConfig.java From glowroot with Apache License 2.0 | 4 votes |
@JsonInclude(Include.NON_NULL) public abstract @Nullable Integer port();
Example 9
Source File: UserRepresentation.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@JsonInclude(Include.NON_NULL) public Boolean getClusterUser() { return clusterUser; }
Example 10
Source File: JsonRpcRequest.java From ethsigner with Apache License 2.0 | 4 votes |
@JsonInclude(Include.NON_NULL) @JsonGetter("params") public Object getParams() { return params; }
Example 11
Source File: ContentItemRepresentation.java From flowable-engine with Apache License 2.0 | 4 votes |
@JsonInclude(Include.NON_NULL) public String getContentStoreName() { return contentStoreName; }
Example 12
Source File: RestVariable.java From flowable-engine with Apache License 2.0 | 4 votes |
@JsonInclude(Include.NON_NULL) public String getValueUrl() { return valueUrl; }
Example 13
Source File: JsonMapper.java From distributed-transaction-process with MIT License | 4 votes |
/** * 创建只输出非Null的属性到Json字符串的Mapper. */ public static JsonMapper nonNullMapper() { return new JsonMapper(Include.NON_NULL); }
Example 14
Source File: ResourceDto.java From brooklyn-server with Apache License 2.0 | 4 votes |
@JsonInclude(Include.NON_NULL) public String getDescription() { return description; }
Example 15
Source File: JsonMapper.java From j360-dubbo-app-all with Apache License 2.0 | 4 votes |
/** * 创建只输出非Null的属性到Json字符串的Mapper. */ public static JsonMapper nonNullMapper() { return new JsonMapper(Include.NON_NULL); }
Example 16
Source File: SyncingResult.java From besu with Apache License 2.0 | 4 votes |
@JsonInclude(value = Include.NON_NULL) @JsonGetter(value = "knownStates") public String getKnownStates() { return knownStates; }
Example 17
Source File: SyncingResult.java From besu with Apache License 2.0 | 4 votes |
@JsonInclude(value = Include.NON_NULL) @JsonGetter(value = "pulledStates") public String getPullStates() { return pullStates; }
Example 18
Source File: BlockResult.java From besu with Apache License 2.0 | 4 votes |
@JsonGetter(value = "author") @JsonInclude(Include.NON_NULL) public String getCoinbase() { return coinbase; }
Example 19
Source File: JsonRpcRequest.java From besu with Apache License 2.0 | 4 votes |
@JsonInclude(Include.NON_NULL) @JsonGetter("params") public Object[] getParams() { return params; }
Example 20
Source File: JacksonBundle.java From base-framework with Apache License 2.0 | 2 votes |
/** * 创建序列化属性为非空(null)值的ObjectMapper * * @return {@link JacksonBundle} */ public static JacksonBundle nonNullMapper() { return new JacksonBundle(Include.NON_NULL); }