Code example for JSONObject

Methods: optJSONObject

0
    public boolean isFormValidationError() { 
        return code == FORM_VALIDATION_ERROR;
    } 
 
    public JSONObject getPreregistrationRecord() {
        JSONObject preregFields = raw_response.optJSONObject("prereg_fields");
        if (preregFields == null) return null;
        return CaptureRecord.captureRecordWithPrefilledFields(JsonUtils.jsonToCollection(preregFields),
                Jump.getCaptureFlow()); 
    } 
}