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 クラスは何になりますか? クラスを生成したとき、クラスには番地などのプロパティはありませんでした

4

1 に答える 1

-1
class One{
String streetAddress;
String city;
String state;

// put getters and setters for each of the member variables.

}

あなたの質問が解決することを願っています:)

于 2016-10-14T05:48:18.107 に答える