Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/21596
  
    It sounds like Jackson have an important behavior change that might impact 
us. 
    ```Scala
    import com.fasterxml.jackson.annotation.JsonInclude.Include
    import com.fasterxml.jackson.databind.{DeserializationFeature, ObjectMapper}
    import com.fasterxml.jackson.module.scala.DefaultScalaModule
    import com.fasterxml.jackson.module.scala.experimental.ScalaObjectMapper
    
    val mapper = new ObjectMapper with ScalaObjectMapper
    mapper.setSerializationInclusion(Include.NON_NULL)
    mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
    mapper.registerModule(DefaultScalaModule)
    
    println(mapper.writeValueAsString(Map("abc" -> null)))
    ```
    
    Previously, it outputs `{"abc":null}`, but now it is `{}`, unless we 
explicitly set it to `Include.ALWAYS`. The upgrade looks risky to me. 
    



---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to