dave08
01/18/2023, 12:13 PM@Serializable data class Foo(val bar: Int, val json: String)
val sample = Foo(1, """{"some": "json"}""")
val result = Json.encodeToString(sample)
// The result should be: { "bar": 1, "json": { "some": "json" } }
?ephemient
01/18/2023, 12:15 PMdave08
01/18/2023, 12:17 PMJsonElement
for the json
field and it would work?ephemient
01/18/2023, 12:18 PMFoo(
bar = 1,
json = buildJsonObject {
put("some", "json")
}
)
then yes, that currently worksdave08
01/18/2023, 12:20 PM