1
{
"type" : "object",
"properties" : {
"street_address" : {
"type" : "string"
},
"city" : {
"type" : "string"
},
"state" : {
"type" : "string"
}
},
"oneOf" : [{
"required" : ["city"]
}, {
"required" : ["state"]
}
],
"required" : [
"street_address"
],
"additionalProperties" : false
}
什么是这个json架构的Java类? 当我生成的类,有像类杰克逊如何从json架构生成pojo有一个
但验证没有发生,即使我通过城市和说明它不会抛出任何错误 – user3752483