We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug description See FasterXML/jackson-databind#4771: jackson QName (de)serialization ignores prefix.
Environment Spring Batch 5.1.2, JDK 21
Steps to reproduce
@Test void qname() throws Exception { Jackson2ExecutionContextStringSerializer serializer = new Jackson2ExecutionContextStringSerializer(); ExecutionContext context = new ExecutionContext(); QName qname = new QName("http://namespace", "test", "p"); context.put("qname", qname); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); serializer.serialize(new HashMap<>(context.toMap()), outputStream); LOGGER.info(outputStream.toString(StandardCharsets.UTF_8)); // <- {"@class":"java.util.HashMap","qname":["javax.xml.namespace.QName","{http://namespace}test"]} Map<String, Object> result = serializer.deserializeFromByteArray(outputStream.toByteArray()); QName value = (QName) result.get("qname"); assertThat(value.getLocalPart()).isEqualTo(qname.getLocalPart()); assertThat(value.getNamespaceURI()).isEqualTo(qname.getNamespaceURI()); assertThat(value.getPrefix()).isEqualTo(qname.getPrefix()); // <- fails }
Expected behavior QName prefix is preserved in context (de)serialization roundtrip.
Spring Batch StaxEventItemWriter depends on QName prefix being preserved correctly:
spring-batch/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/xml/StaxEventItemWriter.java
Lines 796 to 799 in fc1f3fc
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug description
See FasterXML/jackson-databind#4771: jackson QName (de)serialization ignores prefix.
Environment
Spring Batch 5.1.2, JDK 21
Steps to reproduce
Expected behavior
QName prefix is preserved in context (de)serialization roundtrip.
Spring Batch StaxEventItemWriter depends on QName prefix being preserved correctly:
spring-batch/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/xml/StaxEventItemWriter.java
Lines 796 to 799 in fc1f3fc
The text was updated successfully, but these errors were encountered: