Vikas Singh
03/29/2021, 7:47 PMDominaezzz
03/29/2021, 7:58 PMVikas Singh
03/30/2021, 8:20 AM@Serializable
data class HomeDetails(
val comments: String,
val description: String,
val favorites: String,
@SerialName("first_name")
val firstName: String,
@SerialName("hash_tags")
val hashTags: List<String>,
@SerialName("last_name")
val lastName: String,
@SerialName("post_id")
val postId: String,
@SerialName("post_like")
val postLike: String,
@SerialName("post_song")
val postSong: String,
@SerialName("post_unlike")
val postUnlike: String,
@SerialName("singer_type")
val singerType: String,
val thumbnail: String
)
Dominaezzz
03/30/2021, 8:43 AMVikas Singh
03/30/2021, 8:46 AMRedTahr1
04/01/2021, 1:33 PMimport kotlinx.serialization.*
import kotlinx.serialization.json.*
val test = HomeDetails("com","desc","fav","name", listOf("list-item"),"last","id",
"postlike","postsong","unlike","type","thumb")
println(Json.encodeToString(test))