Sets the JSON schema string with field names and the types according to the JSON schema
specification [[http://json-schema.org/specification.html]].

<p>The schema might be nested.

@param jsonSchema JSON schema
501790
public Json jsonSchema(String jsonSchema) {
		Preconditions.checkNotNull(jsonSchema);
		this.jsonSchema = jsonSchema;
		this.schema = null;
		this.deriveSchema = null;
		return this;
	}
493584
public Schema loadSchema(String schema) {
    try {
      JSONObject rawSchema = new JSONObject(new JSONTokener(schema));
      return SchemaLoader.load(rawSchema);
    } catch (JSONException | SchemaException e) {
      throw new InvalidJsonSchemaException(e);
    }
  }
963864
public static Schema arrayOf(Schema componentSchema) {
    return new Schema(Type.ARRAY, null, componentSchema, null, null, null, null, null);
  }
1275652
public void setCurrentSchema(final String schemaName) {
        if (isSwitchFailed()) {
            throw new ShardingException("Failed to switch schema, please terminate current transaction.");
        }
        this.schemaName = schemaName;
        this.logicSchema = LogicSchemas.getInstance().getLogicSchema(schemaName);
    }
178200
public void setSchemaExtensionsInfo(java.util.Collection<SchemaExtensionInfo> schemaExtensionsInfo) {
        if (schemaExtensionsInfo == null) {
            this.schemaExtensionsInfo = null;
            return;
        }

        this.schemaExtensionsInfo = new com.amazonaws.internal.SdkInternalList<SchemaExtensionInfo>(schemaExtensionsInfo);
    }
1177133
function JSONSchema () {
  var self = this;

  self.klass = JSONSchema;
  self.klass.super_.apply(self, arguments);

  self.engine = require('json-schema');
}
1133191
public void setSchemaAttributes(java.util.Collection<SchemaAttributeType> schemaAttributes) {
        if (schemaAttributes == null) {
            this.schemaAttributes = null;
            return;
        }

        this.schemaAttributes = new java.util.ArrayList<SchemaAttributeType>(schemaAttributes);
    }
46244
@Override
    public void setScheme(SchemeValues scheme) {
        this.myScheme = scheme;
        super.setFirstLineChanged();
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "setScheme(v): " + (null != scheme ? scheme.getName() : null));
        }
    }
794307
public void setSchema(String schema)
   {
      if (schema.charAt(schema.length() - 1) != '.')
      {
         schema = schema + '.';
      }
      m_schema = schema;
   }
431825
public void addSchema( String uri, IslandSchema s ) {
		if( schemata.containsKey(uri) )
			throw new IllegalArgumentException();
		schemata.put( uri, s );
	}
901178
private void setJsonSchemaProperties(JsonObject jsonObject) {
    setColumnName(jsonObject.get(COLUMN_NAME_KEY).getAsString());
    setDataType(jsonObject.get(DATA_TYPE_KEY).getAsJsonObject());
    setNullable(jsonObject.has(IS_NULLABLE_KEY) && jsonObject.get(IS_NULLABLE_KEY).getAsBoolean());
    setComment(getOptionalProperty(jsonObject, COMMENT_KEY));
    setDefaultValue(getOptionalProperty(jsonObject, DEFAULT_VALUE_KEY));
  }
804461
public void putTableSchema(String key, TableSchema schema) {
		checkNotNull(key);
		checkNotNull(schema);

		final String[] fieldNames = schema.getFieldNames();
		final TypeInformation<?>[] fieldTypes = schema.getFieldTypes();

		final List<List<String>> values = new ArrayList<>();
		for (int i = 0; i < schema.getFieldCount(); i++) {
			values.add(Arrays.asList(fieldNames[i], TypeStringUtils.writeTypeInfo(fieldTypes[i])));
		}

		putIndexedFixedProperties(
			key,
			Arrays.asList(TABLE_SCHEMA_NAME, TABLE_SCHEMA_TYPE),
			values);
	}
495226
public DataWriterBuilder<S, D> withSchema(S schema) {
    this.schema = schema;
    log.debug("withSchema : {}", this.schema);
    return this;
  }
527334
private synchronized JsonSchema getInputPathJsonSchema() throws IOException {
        if (inputPathJsonSchema == null) {
            // No need to query Hadoop more than once as this shouldn't change mid-run,
            // thus, we can lazily initialize and cache the result.
            inputPathJsonSchema = HadoopUtils.getSchemaFromPath(getInputPath());
        }
        return inputPathJsonSchema;
    }
938298
public static Schema mapOf(Schema keySchema, Schema valueSchema) {
    return new Schema(Type.MAP, null, null, keySchema, valueSchema, null, null, null);
  }
67383
@Given("^json (.+?) matches schema (.+?)$")
    public void jsonMatchesSchema(String json, String schema) throws Exception {
        JSONObject jsonschema = new JSONObject(schema);
        JSONObject jsondeploy = new JSONObject(json);

        commonspec.matchJsonToSchema(jsonschema, jsondeploy);
    }
476431
public boolean matchJsonToSchema(JSONObject schema, JSONObject json) throws Exception {
        SchemaLoader.builder()
                 .useDefaults(true)
                 .schemaJson(schema)
                 .build()
                 .load()
                 .build()
                 .validate(json);
        return true;
    }