Search before asking
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
Search before asking
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
Expected behavior
QName prefix is preserved.
Additional context
No response