public static class ITextComponent.Serializer extends java.lang.Object implements com.google.gson.JsonDeserializer<ITextComponent>, com.google.gson.JsonSerializer<ITextComponent>
Modifier and Type | Field and Description |
---|---|
private static com.google.gson.Gson |
GSON |
Constructor and Description |
---|
Serializer() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
componentToJson(ITextComponent component) |
ITextComponent |
deserialize(com.google.gson.JsonElement p_deserialize_1_,
java.lang.reflect.Type p_deserialize_2_,
com.google.gson.JsonDeserializationContext p_deserialize_3_) |
static ITextComponent |
fromJsonLenient(java.lang.String json) |
static ITextComponent |
jsonToComponent(java.lang.String json) |
com.google.gson.JsonElement |
serialize(ITextComponent p_serialize_1_,
java.lang.reflect.Type p_serialize_2_,
com.google.gson.JsonSerializationContext p_serialize_3_) |
private void |
serializeChatStyle(Style style,
com.google.gson.JsonObject object,
com.google.gson.JsonSerializationContext ctx) |
public ITextComponent deserialize(com.google.gson.JsonElement p_deserialize_1_, java.lang.reflect.Type p_deserialize_2_, com.google.gson.JsonDeserializationContext p_deserialize_3_) throws com.google.gson.JsonParseException
deserialize
in interface com.google.gson.JsonDeserializer<ITextComponent>
com.google.gson.JsonParseException
private void serializeChatStyle(Style style, com.google.gson.JsonObject object, com.google.gson.JsonSerializationContext ctx)
public com.google.gson.JsonElement serialize(ITextComponent p_serialize_1_, java.lang.reflect.Type p_serialize_2_, com.google.gson.JsonSerializationContext p_serialize_3_)
serialize
in interface com.google.gson.JsonSerializer<ITextComponent>
public static java.lang.String componentToJson(ITextComponent component)
@Nullable public static ITextComponent jsonToComponent(java.lang.String json)
@Nullable public static ITextComponent fromJsonLenient(java.lang.String json)