public interface SafeTextSerializer extends TextSerializer
TextSerializer
that accepts input in any format and will
therefore never throw an exception when parsing a serialized Text
.TextSerializer
Modifier and Type | Method and Description |
---|---|
Text |
deserialize(String input)
Returns a
Text instance from an appropriately formatted string. |
default Text |
deserializeUnchecked(String input)
Tries to return a
Text instance from the provided input string. |
serialize, serializeSingle
getId, getName
Text deserialize(String input)
TextSerializer
Text
instance from an appropriately formatted string.deserialize
in interface TextSerializer
input
- The raw input to parse into a textdefault Text deserializeUnchecked(String input)
TextSerializer
Text
instance from the provided input string.
However, if the input string is not of a valid format, the returned
Text
object will be of the raw input, rather than throwing an
exception.deserializeUnchecked
in interface TextSerializer
input
- The raw input to try to parse into a text