Interface JsonDeserializationContext

    • Method Detail

      • deserialize

        <T> T deserialize​(JsonElement json,
                          Type typeOfT)
                   throws JsonParseException
        Invokes default deserialization on the specified object. It should never be invoked on the element received as a parameter of the JsonDeserializer.deserialize(JsonElement, Type, JsonDeserializationContext) method. Doing so will result in an infinite loop since Gson will in-turn call the custom deserializer again.
        Type Parameters:
        T - The type of the deserialized object.
        json - the parse tree.
        typeOfT - type of the expected return value.
        An object of type typeOfT.
        JsonParseException - if the parse tree does not contain expected data.