def _parse_schema_json(schema_json):
  """Translate a JSON schema into a Schema proto."""
  schema_dict = json.loads(schema_json)
  feature_spec = {
      feature_dict['name']: _column_schema_from_json(feature_dict)
      for feature_dict in schema_dict.get('feature', [])
  }
  domains = {
      feature_dict['name']: _domain_from_json(feature_dict['domain'])
      for feature_dict in schema_dict.get('feature', [])
  }
  return schema_utils.schema_from_feature_spec(feature_spec, domains)
Translate a JSON schema into a Schema proto.
tensorflow_transform/tf_metadata/metadata_io.py