Package com.bazaarvoice.commons.data.model.json.schema.validation

Examples of com.bazaarvoice.commons.data.model.json.schema.validation.ValidationResults


        List<ValidationResults> allUnionResults = Lists.newArrayList();

        // it's not an object, so just validate against all of them and see if there is a schema that's found without errors
        int index = 1;
        for (final JSONSchema unionSchema : getSchemas()) {
            ValidationResults testResults = new ValidationResults();
            unionSchema.validate(obj, buildPath(path, unionSchema, index++), testResults);
            if (!testResults.hasWarningsOrErrors()) {
                // found a good one, so short circuit
                return;
            }

            allUnionResults.add(testResults);
View Full Code Here


    }

    @Override
    public ValidationResults fromJSONObject(JSONObject jsonObject)
            throws JSONException {
        return new ValidationResults().
                addResults(_validationResultMarshaller.fromJSONArray(jsonObject.optJSONArray(getResultsField())));
    }
View Full Code Here

TOP

Related Classes of com.bazaarvoice.commons.data.model.json.schema.validation.ValidationResults

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.