Hello folks

I am using jackson xml  to deserialize an array of elements of diferent 
types like.

<array>
     <type1>...content-1a...<type1/>
     <type2>...content-2...<type2/>
     <type1>...content-1b...<type1/>
<array>

The problem is that when using tree model 
(JsonParser#readValueAsTree<TreeNode>) in my custom deserializer, this is 
transformed into json and it becomes

{
    "array" :  {
        "type1": [{content-1a}, {content-1b}]
        "type2": {content-2}
    }
}

As you notice order information is lost.  I am aware (as it said in 
documentation) that tree modeling has some limitation but I am wondering if 
there is any suggested workaround. Note that I am using custom 
serialization register using JacksonXmlModule.addDeserializer and not 
annotation base approach. 


-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-user/5b129782-c3c2-4bb3-b9c8-8222d18339c0n%40googlegroups.com.

Reply via email to