fastjson Parse Error

nom7f22z  于 4个月前  发布在  其他
关注(0)|答案(2)|浏览(103)

I am converting json to pojo

{
	"Response": [{
		"Status": {
			"StatusCode": {
				"Value": "urn:oasis:names:tc:xacml:1.0:status:ok"
			}
		},
		"Decision": "NotApplicable"
	}]
}
public class PdpResponse {

    @JSONField(name ="Response")
    public Response response;

    public static class Response {
        public List<InnerObject> innerObjects;
    }

    public static class InnerObject {
        @JSONField(name = "Status")
        public Status status;
        @JSONField(name = "Decision")
        public String decision;
    }

    public static class Status {
        @JSONField(name = "StatusCode")
        public StatusCode statusCode;
    }

    public static class StatusCode {
        @JSONField(name = "Value")
        public String value;
    }

    @JsonIgnore
    public String retrieveDecision(){
        return this.response.innerObjects.get(0).decision;
    }
}

But getting parsing exception.
error is:syntax error, expect {, actual error, pos 0 cause:null

相关问题