C - The type of the config instancepublic class StringTypeSerializer<C> extends ConfigTypeSerializer<C,java.lang.String>
key: 123
key2: true
key3: "string"
key4: string
All the values are valid strings, but only `key3` and `key4` are interpreted as strings by yaml.ClassCastException will be thrown because the value is a number or boolean.config| Constructor and Description |
|---|
StringTypeSerializer(C config,
boolean emptyIsNull) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
deserialize(java.lang.Object serializedObject)
Deserializes the given yaml object to the type
T. |
java.lang.Object |
serialize(java.lang.String object)
Serializes the given object to a yaml object.
|
deserialize, deserialize, deserialize, serialize, serializepublic StringTypeSerializer(C config, boolean emptyIsNull)
config - The config instanceemptyIsNull - If empty strings should be deserialized as null and null serialized as empty stringspublic java.lang.String deserialize(java.lang.Object serializedObject)
ConfigTypeSerializerT.Tag for the possible types.deserialize in class ConfigTypeSerializer<C,java.lang.String>serializedObject - The object to deserializepublic java.lang.Object serialize(java.lang.String object)
ConfigTypeSerializerTag for the possible types.serialize in class ConfigTypeSerializer<C,java.lang.String>object - The object to serialize