I creating a Shared lib by Kotlin multiplatform and I use Kotlin Serialization library for Serialize and Deserialize, I Implementing Graph QL on my project and I use below struct
{
"operationName":"Operation",
"query":"query Operation($id: ID){rres: Cards(id: $id){id}}",
"variables":{"id": 1}
}
for communication with API, now I have a issue that I should fill a Json as a Object in variables by Kotlinx.Serialization but I don't find a way for it while I fill varibales as String and API get exception to me.
How I create a nested Json by Kotlinx.Serialization?