Class StaxUtil
java.lang.Object
com.fasterxml.jackson.dataformat.xml.util.StaxUtil
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
private static Throwable
static XMLInputFactory
static XMLOutputFactory
static String
sanitizeXmlTypeName
(String name) Since XML names can not contain all characters JSON names can, we may need to replace characters.static <T> T
throwAsGenerationException
(XMLStreamException e, com.fasterxml.jackson.core.JsonGenerator g) static <T> T
throwAsParseException
(XMLStreamException e, com.fasterxml.jackson.core.JsonParser p) static org.codehaus.stax2.typed.Base64Variant
toStax2Base64Variant
(com.fasterxml.jackson.core.Base64Variant j64b) Helper method used to "convert" Jackson'sBase64Variant
into corresponding Stax2 equivalent, to try to allow Jackson-style configuration for XML output as well.
-
Constructor Details
-
StaxUtil
public StaxUtil()
-
-
Method Details
-
throwAsParseException
public static <T> T throwAsParseException(XMLStreamException e, com.fasterxml.jackson.core.JsonParser p) throws IOException - Throws:
IOException
- Since:
- 2.9
-
throwAsGenerationException
public static <T> T throwAsGenerationException(XMLStreamException e, com.fasterxml.jackson.core.JsonGenerator g) throws IOException - Throws:
IOException
- Since:
- 2.9
-
_unwrap
-
_message
-
sanitizeXmlTypeName
Since XML names can not contain all characters JSON names can, we may need to replace characters. Let's start with trivial replacement of ASCII characters that can not be included. -
toStax2Base64Variant
public static org.codehaus.stax2.typed.Base64Variant toStax2Base64Variant(com.fasterxml.jackson.core.Base64Variant j64b) Helper method used to "convert" Jackson'sBase64Variant
into corresponding Stax2 equivalent, to try to allow Jackson-style configuration for XML output as well.- Parameters:
j64b
- Jackson base64 variant to find match for- Returns:
- Stax2 Base64 variant that most closely resembles Jackson canonical Base64 variant passed in as argument
- Since:
- 2.12
-
defaultInputFactory
- Since:
- 2.14
-
defaultOutputFactory
- Since:
- 2.14
-