コンストラクタと説明 |
---|
Deserializer() |
修飾子とタイプ | メソッドと説明 |
---|---|
Variant |
deserialize(com.google.gson.JsonElement p_deserialize_1_,
java.lang.reflect.Type p_deserialize_2_,
com.google.gson.JsonDeserializationContext p_deserialize_3_)
Gson invokes this call-back method during deserialization when it encounters a field of the
specified type.
|
protected ResourceLocation |
getStringModel(com.google.gson.JsonObject json) |
protected ModelRotation |
parseModelRotation(com.google.gson.JsonObject json) |
protected int |
parseWeight(com.google.gson.JsonObject json) |
public Variant 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
com.google.gson.JsonDeserializer
In the implementation of this call-back method, you should consider invoking
JsonDeserializationContext.deserialize(JsonElement, Type)
method to create objects
for any non-trivial field of the returned object. However, you should never invoke it on the
the same type passing json
since that will cause an infinite loop (Gson will call your
call-back method again).
deserialize
インタフェース内 com.google.gson.JsonDeserializer<Variant>
p_deserialize_1_
- The Json data being deserializedp_deserialize_2_
- The type of the Object to deserialize toT
com.google.gson.JsonParseException
- if json is not in the expected format of typeofT
protected ModelRotation parseModelRotation(com.google.gson.JsonObject json)
protected ResourceLocation getStringModel(com.google.gson.JsonObject json)
protected int parseWeight(com.google.gson.JsonObject json)