data class Example(var foo: String, val bar: Int)
val jsonNode = JsonGenerator.generate(Example("lalala", 2))
val pojo = PojoMapper.map(JsonObject.parse(json.toJson()), Example::class.java)
This will break as the compiler does not create any default constructor for Example