public static class Style.Serializer extends Object implements JsonDeserializer<Style>, JsonSerializer<Style>
Style
.Constructor and Description |
---|
Serializer() |
Modifier and Type | Method and Description |
---|---|
Style |
deserialize(JsonElement jsonElement,
Type type,
JsonDeserializationContext jsonDeserializationContext) |
private static ClickEvent |
getClickEvent(JsonObject root) |
private static Identifier |
getFont(JsonObject root) |
private static HoverEvent |
getHoverEvent(JsonObject root) |
private static TextColor |
parseColor(JsonObject root) |
private static String |
parseInsertion(JsonObject root) |
private static Boolean |
parseNullableBoolean(JsonObject root,
String key) |
JsonElement |
serialize(Style style,
Type type,
JsonSerializationContext jsonSerializationContext) |
@Nullable public Style deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException
deserialize
in interface JsonDeserializer<Style>
JsonParseException
@Nullable private static Identifier getFont(JsonObject root)
@Nullable private static HoverEvent getHoverEvent(JsonObject root)
@Nullable private static ClickEvent getClickEvent(JsonObject root)
@Nullable private static String parseInsertion(JsonObject root)
@Nullable private static TextColor parseColor(JsonObject root)
@Nullable private static Boolean parseNullableBoolean(JsonObject root, String key)
@Nullable public JsonElement serialize(Style style, Type type, JsonSerializationContext jsonSerializationContext)
serialize
in interface JsonSerializer<Style>