File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed
app/src/main/java/com/httpsms Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change 1- // To parse the JSON, install Klaxon and do:
2- //
3- // val welcome4 = Welcome4.fromJson(jsonString)
4-
51package com.httpsms
62
73import com.beust.klaxon.Json
84import com.beust.klaxon.Klaxon
95
10- private val klaxon = Klaxon ()
11-
126data class ResponseMessage (
137 val data : Message ,
148 val message : String ,
159 val status : String
1610) {
1711 companion object {
18- fun fromJson (json : String ) = klaxon .parse<ResponseMessage >(json)
12+ fun fromJson (json : String ) = Klaxon () .parse<ResponseMessage >(json)
1913 }
2014}
2115data class ResponsePhone (
@@ -24,7 +18,7 @@ data class ResponsePhone (
2418 val status : String ,
2519) {
2620 companion object {
27- fun fromJson (json : String ) = klaxon .parse<ResponsePhone >(json)
21+ fun fromJson (json : String ) = Klaxon () .parse<ResponsePhone >(json)
2822 }
2923}
3024
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ buildscript {
1212}
1313
1414plugins {
15- id ' com.android.application' version ' 8.1.0 ' apply false
16- id ' com.android.library' version ' 8.1.0 ' apply false
15+ id ' com.android.application' version ' 8.1.1 ' apply false
16+ id ' com.android.library' version ' 8.1.1 ' apply false
1717 id ' org.jetbrains.kotlin.android' version ' 1.6.21' apply false
1818}
1919
You can’t perform that action at this time.
0 commit comments