public static class Text.Serializer extends Object implements com.google.gson.JsonDeserializer<MutableText>, com.google.gson.JsonSerializer<Text>
Text.| Modifier and Type | Field and Description |
|---|---|
private static com.google.gson.Gson |
GSON |
private static Field |
JSON_READER_LINE_START |
private static Field |
JSON_READER_POS |
| Constructor and Description |
|---|
Serializer() |
| Modifier and Type | Method and Description |
|---|---|
private void |
addStyle(Style style,
com.google.gson.JsonObject json,
com.google.gson.JsonSerializationContext context) |
MutableText |
deserialize(com.google.gson.JsonElement jsonElement,
Type type,
com.google.gson.JsonDeserializationContext jsonDeserializationContext) |
static MutableText |
fromJson(com.google.gson.JsonElement json) |
static MutableText |
fromJson(String json) |
static MutableText |
fromJson(com.mojang.brigadier.StringReader reader) |
static MutableText |
fromLenientJson(String json) |
private static int |
getPosition(com.google.gson.stream.JsonReader reader) |
com.google.gson.JsonElement |
serialize(Text text,
Type type,
com.google.gson.JsonSerializationContext jsonSerializationContext) |
static String |
toJson(Text text) |
static com.google.gson.JsonElement |
toJsonTree(Text text) |
private static final com.google.gson.Gson GSON
private static final Field JSON_READER_POS
private static final Field JSON_READER_LINE_START
public MutableText deserialize(com.google.gson.JsonElement jsonElement, Type type, com.google.gson.JsonDeserializationContext jsonDeserializationContext) throws com.google.gson.JsonParseException
deserialize in interface com.google.gson.JsonDeserializer<MutableText>com.google.gson.JsonParseExceptionprivate void addStyle(Style style, com.google.gson.JsonObject json, com.google.gson.JsonSerializationContext context)
public com.google.gson.JsonElement serialize(Text text, Type type, com.google.gson.JsonSerializationContext jsonSerializationContext)
serialize in interface com.google.gson.JsonSerializer<Text>public static com.google.gson.JsonElement toJsonTree(Text text)
@Nullable public static MutableText fromJson(String json)
@Nullable public static MutableText fromJson(com.google.gson.JsonElement json)
@Nullable public static MutableText fromLenientJson(String json)
public static MutableText fromJson(com.mojang.brigadier.StringReader reader)
private static int getPosition(com.google.gson.stream.JsonReader reader)