-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
2.19Issues planned at 2.19 or laterIssues planned at 2.19 or later
Milestone
Description
Search before asking
- I searched in the issues and found nothing similar.
Describe the bug
QName (de)serialization ignores prefix, because it uses QName#toString() and QName#valueOf(java.lang.String).
Version Information
2.17.2
Reproduction
QName qname = new QName("http://test.com", "test", "p");
System.out.println(qname.getPrefix()); // <- p
ObjectMapper mapper = new ObjectMapper();
String ser = mapper.writeValueAsString(writer, qname);
System.out.println(ser); // <- "{http://test.com}test"
QName result = mapper.readValue(ser, QName.class);
System.out.println(result.getPrefix()); // <- empty string
Expected behavior
QName prefix is preserved.
Additional context
No response
Metadata
Metadata
Assignees
Labels
2.19Issues planned at 2.19 or laterIssues planned at 2.19 or later