Search in sources :

Example 1 with JsonDataFormat

use of org.spongepowered.common.data.persistence.JsonDataFormat in project SpongeCommon by SpongePowered.

the class DataFormatRegistryModule method registerDefaults.

@Override
public void registerDefaults() {
    this.dataFormatMappings.put("nbt", new NbtDataFormat("nbt"));
    this.dataFormatMappings.put("json", new JsonDataFormat());
    this.dataFormatMappings.put("hocon", new HoconDataFormat("hocon"));
}
Also used : JsonDataFormat(org.spongepowered.common.data.persistence.JsonDataFormat) NbtDataFormat(org.spongepowered.common.data.persistence.NbtDataFormat) HoconDataFormat(org.spongepowered.common.data.persistence.HoconDataFormat)

Example 2 with JsonDataFormat

use of org.spongepowered.common.data.persistence.JsonDataFormat in project SpongeCommon by SpongePowered.

the class SpongeRegistryLoaders method dataFormat.

public static RegistryLoader<DataFormat> dataFormat() {
    return RegistryLoader.of(l -> {
        l.add(DataFormats.JSON, k -> new JsonDataFormat());
        l.add(DataFormats.HOCON, k -> new HoconDataFormat());
        l.add(DataFormats.NBT, k -> new NBTDataFormat());
    });
}
Also used : JsonDataFormat(org.spongepowered.common.data.persistence.JsonDataFormat) NBTDataFormat(org.spongepowered.common.data.persistence.NBTDataFormat) HoconDataFormat(org.spongepowered.common.data.persistence.HoconDataFormat)

Aggregations

HoconDataFormat (org.spongepowered.common.data.persistence.HoconDataFormat)2 JsonDataFormat (org.spongepowered.common.data.persistence.JsonDataFormat)2 NBTDataFormat (org.spongepowered.common.data.persistence.NBTDataFormat)1 NbtDataFormat (org.spongepowered.common.data.persistence.NbtDataFormat)1