All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.deque.axe.android.moshi.AxeEventStreamAdapter.kt Maven / Gradle / Ivy

The newest version!
package com.deque.axe.android.moshi

import com.deque.axe.android.AxeEvent
import com.deque.axe.android.wrappers.AxeEventStream
import com.squareup.moshi.FromJson
import com.squareup.moshi.ToJson

internal class AxeEventStreamAdapter {
    @ToJson
    fun arrayListToJson(list: AxeEventStream): List = list

    @FromJson
    fun arrayListFromJson(list: List): AxeEventStream = AxeEventStream().also {
        for (event: AxeEvent in list)  {
            it.addEvent(event)
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy