<Platform class kotlin.Unit requires explicit Json...
# stackoverflow
u
Platform class kotlin.Unit requires explicit JsonAdapter to be registered In a retrofit interface I have defined a method return type as ApiModel . but when I call the method I get the error below. Platform class kotlin.Unit requires explicit JsonAdapter to be registered so I tried to create my own JsonAdapter as below. class UnitJsonAdapter { @ToJson fun toJson(writer: JsonWriter) { writer.nullValue() } @FromJson fun fromJson(reader: JsonReader): Unit { reader.close() return Unit } } but I face this error....