I have this endpoint with this structure:
uri = http://127.0.0.1:9090/tables/mask
and this payload:
{
"_id" : "5d66c9b6d5ccf30bd5b6b541",
"connectionId" : "1967c072-b5cf-4e9e-1c92-c2b49eb771c4",
"name" : "Customer",
"columns" : [
{
"name" : "FirstName",
"mask" : true
},
{
"name" : "LastName",
"mask" : false
},
{
"name" : "City",
"mask" : false
},
{
"name" : "Phone",
"mask" : false
}
],
"parentId" : null
}
in my Kotlin code I have this structure to deserialize:
data class ColumnsMaskModel (val name:String, val mask:Boolean )
data class TablesMaskModel (val _id:String, val name:String, val connectionId:String, val columns:MutableList<ColumnsMaskModel?> )
and how can I use TablesMaskModel to make a HTTP post in Kotlin