SalomonBrys / Kotson

Kotlin bindings for JSON manipulation via Gson
MIT License
709 stars 37 forks source link

Version 2.5.0 doesn't export Gson class #32

Open rocboronat opened 7 years ago

rocboronat commented 7 years ago

image

😢

pinkiesky commented 7 years ago

Import Gson as com.google.gson.Gson Example:


import com.github.salomonbrys.kotson.fromJson
import com.google.gson.Gson

class Example {
    private val gson = Gson()

    fun onMessage(message: String) {
        val list1 = gson.fromJson<List<String>>(message)  // perfect!
    }
}