Is there any common approach to generate Kotlin multiplatfom data classes with validation annotations like JAXB+JSR303 in Java?

XML is a more complex language that JSON and cannot be easily translated (there is for example attributes as well as tags, not to speak of mixed content). This would only work for a narrow subset of schemas.