Enum Class XmlSerdeConfiguration.XmlReadFeature

java.lang.Object
java.lang.Enum<XmlSerdeConfiguration.XmlReadFeature>
io.micronaut.serde.xml.XmlSerdeConfiguration.XmlReadFeature
All Implemented Interfaces:
Serializable, Comparable<XmlSerdeConfiguration.XmlReadFeature>, Constable
Enclosing class:
XmlSerdeConfiguration

public static enum XmlSerdeConfiguration.XmlReadFeature extends Enum<XmlSerdeConfiguration.XmlReadFeature>
Toggleable read-side features for the XML object mapper.

All features default to disabled. Enable a feature via the micronaut.serde.format.xml.xml-read-features.<NAME>: true Micronaut configuration property.

Since:
3.2
Author:
Mousrij Hamza
  • Enum Constant Details

    • EMPTY_ELEMENT_AS_NULL

      public static final XmlSerdeConfiguration.XmlReadFeature EMPTY_ELEMENT_AS_NULL
      When enabled, an empty XML element with no content is decoded as null instead of an empty string or empty bean.

      Default (disabled) matches Jackson 3.x default behaviour: empty elements decode to "" for scalar fields and to an empty bean (constructor invoked with defaults) for object-typed fields.

  • Method Details

    • values

      public static XmlSerdeConfiguration.XmlReadFeature[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static XmlSerdeConfiguration.XmlReadFeature valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null