e.g. with moshi: ``` fun main(args: Array<Strin...
# getting-started
u
e.g. with moshi:
Copy code
fun main(args: Array<String>) {

    data class ResultDetail(val lat: Double, val lon: Double)
    data class Result(val details: ResultDetail? = null)

    val zeJson = """
        {
            "id": 4,
            "otherProp" : "ignore this",
            "details": {
                "lat": "52.520645",
                "lon" : "13.409779",
                "otherStuff": "ignore this"
            }
        }
"""

    val foo = Moshi.Builder().build().adapter(Result::class.java).fromJson(zeJson)
    println(foo)

}
­čĹŹ 1