[ 
https://issues.apache.org/jira/browse/NIFIREG-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16209472#comment-16209472
 ] 

ASF GitHub Bot commented on NIFIREG-36:
---------------------------------------

Github user bbende commented on the issue:

    https://github.com/apache/nifi-registry/pull/23
  
    @kevdoran thanks for taking care of this, what do you think about doing 
something like this?
    
    
https://github.com/apache/nifi/blob/master/nifi-commons/nifi-web-utils/src/main/java/org/apache/nifi/web/util/ObjectMapperResolver.java
    
    You then register that as a provider with Jersey and I think whenever it 
marshalls JSON it will use that custom ObjectMapper.
    
    I guess it depends if we want to make a global decision to never include 
nulls, but my preference would be to keep the Jackson annotations out of the 
domain objects if possible.


> Add Jackson JsonInclude Annotations to NiFi Registry Data Model classes
> -----------------------------------------------------------------------
>
>                 Key: NIFIREG-36
>                 URL: https://issues.apache.org/jira/browse/NIFIREG-36
>             Project: NiFi Registry
>          Issue Type: Improvement
>            Reporter: Kevin Doran
>            Assignee: Kevin Doran
>             Fix For: 0.0.1
>
>
> Currently, NiFi Registry responses include null values for optional fields in 
> the serialized Json. This ticket is to add Jackson annotations that prevent 
> explicit "null" from being serialized for optional fields, instead just 
> omitting the optional fields, as not all clients/frameworks can interpret 
> null correctly.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to