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

Examples of com.bazaarvoice.commons.data.model.json.schema.types.JSONSchemaBooleanType


            Number divisibleBy = (Number) jsonObject.opt("divisibleBy");

            List<Object> enums = new GenericJSONArrayList(jsonObject.optJSONArray("enum"));

            if (type instanceof JSONSchemaBooleanType) {
                JSONSchemaBooleanType booleanType = (JSONSchemaBooleanType) type;
                if (defaultValue instanceof Boolean) {
                    booleanType.setDefaultValue((Boolean) defaultValue);
                }
            } else if (type instanceof JSONSchemaIntegerType) {
                JSONSchemaIntegerType intType = (JSONSchemaIntegerType) type;
                if (defaultValue instanceof Number) {
                    intType.setDefaultValue(((Number) defaultValue).intValue());
View Full Code Here


    public static JSONSchema newIntegerSchema() {
        return newSimpleSchema(new JSONSchemaIntegerType());
    }

    public static JSONSchema newBooleanSchema() {
        return newSimpleSchema(new JSONSchemaBooleanType());
    }
View Full Code Here

            Number divisibleBy = (Number) jsonObject.opt("divisibleBy");

            List<Object> enums = new GenericJSONArrayList(jsonObject.optJSONArray("enum"));

            if (type instanceof JSONSchemaBooleanType) {
                JSONSchemaBooleanType booleanType = (JSONSchemaBooleanType) type;
                if (defaultValue instanceof Boolean) {
                    booleanType.setDefaultValue((Boolean) defaultValue);
                }
            } else if (type instanceof JSONSchemaIntegerType) {
                JSONSchemaIntegerType intType = (JSONSchemaIntegerType) type;
                if (defaultValue instanceof Number) {
                    intType.setDefaultValue(((Number) defaultValue).intValue());
View Full Code Here

TOP

Related Classes of com.bazaarvoice.commons.data.model.json.schema.types.JSONSchemaBooleanType

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.