JsonToKotlinClass
JsonToKotlinClass copied to clipboard
For `null` properties, use JsonNode/JsonElement instead of Any
Bonjour,
your plugin is fantastic, what a waste of time it seems now to have written the data classes manually!
I have a request:
If my json contains a null like
{
"started_at": "sdfqsdds",
"closed_at" : null
}
the plugin is currently translating to the Any? type, which gives me a runtime/compile error (don't remember).
I would rather have those types being used, depending on my serialization library:
val jackson: com.fasterxml.jackson.databind.JsonNode? = TODO()
val kotlinx : kotlinx.serialization.json.JsonElement? = TODO()
Good advice! Will fix it next version,thanks