jackson-dataformat-xml
jackson-dataformat-xml copied to clipboard
Extension for Jackson JSON processor that adds support for serializing POJOs as XML (and deserializing from XML) as an alternative to JSON
### Discussed in https://github.com/FasterXML/jackson-dataformat-xml/discussions/786 Originally posted by **kristofvb** November 19, 2025 Hi, I have some questions about the following sample: ``` class ParseTest { @Test void parse() throws Exception {...
### Search before asking - [x] I searched in the [issues](https://github.com/FasterXML/jackson-databind/issues) and found nothing similar. ### Describe the bug Following class can't be deserialized with Jackson 2.18.2: `public record Variable(...
Use this annotation when need to have different result for json and xml output. Parameters for this annotation same as for JsonInclude.
If the `UnwrappedPolymorphicList490Test` is changed to the following: ```diff package com.fasterxml.jackson.dataformat.xml.lists; import java.util.*; import org.junit.jupiter.api.Test; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.XmlTestUtil; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; public class UnwrappedPolymorphicList490Test...
Using the following code: ```java @Override public XmlNode deserialize(JsonParser p, DeserializationContext ctxt) { if (p instanceof FromXmlParser) { XMLStreamReader reader = ((FromXmlParser) p).getStaxReader(); while (reader.hasNext()) { switch (reader.next()) { case...
`@JacksonXmlElementWrapper(useWrapping = false)` results in an exception being thrown when used inside a `@JsonUnwrapped` property: ``` java.lang.IllegalStateException: Internal error: should never get called at com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer.newDelegatingInstance(WrapperHandlingDeserializer.java:64) ``` A small reproducer of...
i want to set a comment on the some fileds, i not found some mathod to set a comment
Please consider the following scenario: `public record Bar(ArrayList bar) {}` ``` void main() throws JsonProcessingException { var bar = new XmlMapper().readValue("", Bar.class); System.out.println(bar); // Desired output: Bar[bar=[]] } ``` As...
Hello. I understand that Jackson 3 plans to better support formats other than JSON. In particular, for XML, it would be nice to have a method like `JsonNode.getArray(String element)` to...
Jackson seems to be overwriting the older sibling nodes if the order is mixed. See below test case. Seems to be a bug. Thanks. @JacksonXmlRootElement data class RootNode( @JacksonXmlElementWrapper(useWrapping =...