java - FasterXML/jackson-dataformat-xml deserialize mixed ordered tag -
i have xml customer:
<a> <b id="id1"/> <any-tag/> <b id="id2"/> </a>
and simple java class
import com.fasterxml.jackson.dataformat.xml.annotation.jacksonxmlelementwrapper; import com.fasterxml.jackson.dataformat.xml.annotation.jacksonxmlproperty; import lombok.tostring; import java.util.list; @tostring public class { @tostring public static class b { public string id; } @jacksonxmlproperty(localname = "b") @jacksonxmlelementwrapper(usewrapping = false) public list<b> blist; }
when jackson finish parsing have result
a(blist=[a.b(id=id2)])
it evident got second tag, expected 2 tags in blist. realized due fact any-tag tag between first , second tag b.
how can read b tags in list? ps tag contains other content should read.
i'm using:
'com.fasterxml.jackson.core:jackson-databind:2.5.1', 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.5.1', 'org.codehaus.woodstox:woodstox-core-asl:4.1.4',
Comments
Post a Comment