toJsonString
fun <T> Adapter<T>.toJsonString(value: T, customScalarAdapters: CustomScalarAdapters = CustomScalarAdapters.Empty, indent: String? = null): String
fun <Error class: unknown class>.toJsonString(customScalarAdapters: <Error class: unknown class> = CustomScalarAdapters.Empty, indent: String? = null): String
Serializes the given Data
to a string.
Note: this method uses reflection to lookup the adapter. If you are using R8, add the following rules:
-keep class ** implements com.apollographql.apollo.api.Operation$Data
-keep class **.*_ResponseAdapter$Data {
public static ** INSTANCE;
}
Content copied to clipboard
Parameters
customScalarAdapters
the adapters to use for custom scalars