Package 

Class MoshiQueryConverterFactory


  • 
    public final class MoshiQueryConverterFactory
    extends Converter.Factory
                        

    A Retrofit Converter.Factory that JSON-serializes complex objects used as @Query parameters.

    Retrofit's default behavior for @Query is to call toString() on the value, which produces a Kotlin data class string representation instead of JSON. This factory intercepts non-primitive types and serializes them to JSON via Moshi.

    • Method Summary

      Modifier and Type Method Description
      Converter<?, String> stringConverter(Type type, Array<out Annotation> annotations, Retrofit retrofit)
      • Methods inherited from class io.getstream.feeds.android.network.infrastructure.MoshiQueryConverterFactory

        requestBodyConverter, responseBodyConverter
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MoshiQueryConverterFactory

        MoshiQueryConverterFactory(Moshi moshi)