Is it possible to tell kotlinx serialization not to escape a particular string? So if I have a class:
@Serializable
data class ContainsJsonString(val name: String, val jsonString: String)
Is there some annotation which will let me tell kotlinx not to escape or otherwise mess about with the
jsonString
property? I don't need to worry about deserialization, only interested in writing the class `ConstainsJsonString`to a json file. Output would be something like:
{ "name" : "Liam",
"jsonString": { "address" : "1 Acacia Avenue", "favouriteColour": "blue" }
}
Right now I'm getting something like:
{ "name": "Liam",
"jsonString": "{ \\\"address\\\" : \\\"1 Acacia Avenue\\\":\\\"favouriteColour\\\":\\\"blue\\\"}" }
(Posted in this the wrong channel earlier, sorry!)