Package org.polyfrost.oneconfig.api.config.v1.serialize
package org.polyfrost.oneconfig.api.config.v1.serialize
-
ClassDescriptionSerializer<T>A serializer is a class that is capable of turning a
Treeinto a specific typeSerializerand back again
Trees are the primary data structure in OneConfig and are used to represent configuration data
Each node is a key-value pair of either a string and a sub-tree or a string and some data
Trees can contain arbitrary potentially complex data types in them so you need to be able to serialize and deserialize this data into a specific type
The easiest way to do this is to use the builtinObjectSerializerwhich provides simple methods to convert objects into simple types along with the facility to use definedAdapters
The following types are used by this and so you need to be able to serialize and deserialize them primitive type wrappers (Number and Character and Boolean) CharSequence Lists or Arrays of the above types (at your discretion) Map containing the above types If you do not want to use this facility you can create your own complex object serializer and use that instead