Class JSON.GsonResponseBodyConverterToString<T>

java.lang.Object
org.apache.fineract.client.util.JSON.GsonResponseBodyConverterToString<T>
All Implemented Interfaces:
retrofit2.Converter<okhttp3.ResponseBody,T>
Enclosing class:
JSON

public static class JSON.GsonResponseBodyConverterToString<T> extends Object implements retrofit2.Converter<okhttp3.ResponseBody,T>
This wrapper is to take care of this case: when the deserialization fails due to JsonParseException and the expected type is String, then just return the body string.
  • Method Details

    • convert

      public T convert(okhttp3.ResponseBody value) throws IOException
      Specified by:
      convert in interface retrofit2.Converter<okhttp3.ResponseBody,T>
      Throws:
      IOException