ursus
12/24/2020, 4:23 PMjaqxues
12/24/2020, 4:27 PM@Serializable
annotation on the correct classes.
fun TestCorrectlyParsedJsonForClass_SomeClassName() {
assertEquals(Json.decode("""
{
"SomeExampleJson": "that is formatted correctly",
"name": "Hello"
}
"""), SomeExampleJson(name="Hello")
If you don't want to write your own tests, I think there is no functionality built-in the gradle plugin to ensure that every class is annotated correctly, that would be quite a bit of work imo.
Personal recommendation: stick to the tests, they might save you at some point.ursus
12/24/2020, 7:51 PMursus
12/24/2020, 7:53 PMjaqxues
12/24/2020, 7:53 PM.serializer()
missing for that classursus
12/24/2020, 7:59 PMVampire
12/25/2020, 12:08 AM.serializer()
explicitly and that will fail compilation?ursus
12/25/2020, 11:46 AMVampire
12/25/2020, 7:09 PMVampire
12/25/2020, 7:10 PM