3
` kotlin
class TestBean {
var is_subscribe = 0
var subscribe = 0
var isHave = 0
}
val s = "{'is_subscribe':1,'subscribe':1,'isHave':1}"
val b = JSON.parseObject(s, TestBean::class.java)
println("${b.is_subscribe}--${b.subscribe}--${b.isHave}")
`
运行结果 System.out: 0--1--0 预期结果 System.out: 1--1--1