toJSON() {
    var json = {};
    json['class'] = this.ref;

    if (this.superType)
      json['superClass'] = this.superType.ref;

    if (this.isEmbeddable)
      json['embedded'] = true;

    json['acl'] = {
      load: this.loadPermission,
      schemaAdd: this.schemaAddPermission,
      schemaReplace: this.schemaReplacePermission
    };

    var fields = json['fields'] = {};
    for (let attribute of this.declaredAttributes) {
      if (!attribute.isMetadata)
        fields[attribute.name] = attribute;
    }

    return json;
  }
/**
   * Converts ths type schema to json
   * @returns {json}
   */
Converts ths type schema to json
@returns {json}
Converts ths type schema to json @returns { json }
toJSON() {
    var json = {};
    json['class'] = this.ref;
    if (this.superType)
      json['superClass'] = this.superType.ref;
    if (this.isEmbeddable)
      json['embedded'] = true;
    json['acl'] = {
      load: this.loadPermission,
      schemaAdd: this.schemaAddPermission,
      schemaReplace: this.schemaReplacePermission
    };
    var fields = json['fields'] = {};
    for (let attribute of this.declaredAttributes) {
      if (!attribute.isMetadata)
        fields[attribute.name] = attribute;
    }
    return json;
  }
toJSON ( ) { var json = { } ; json [ 'class' ] = this . ref ; if ( this . superType ) json [ 'superClass' ] = this . superType . ref ; if ( this . isEmbeddable ) json [ 'embedded' ] = true ; json [ 'acl' ] = { load : this . loadPermission , schemaAdd : this . schemaAddPermission , schemaReplace : this . schemaReplacePermission } ; var fields = json [ 'fields' ] = { } ; for ( let attribute of this . declaredAttributes ) { if ( ! attribute . isMetadata ) fields [ attribute . name ] = attribute ; } return json ; }
Converts ths type schema to json
 @returns {json}
Converts ths type schema to json @returns { json }