'Serialize the table schema
@return: a JSON-serializable dict containing the table schema'

def serialize(self):

    schema = self._schema
    if (schema is None):
        schema = {}
        self._references = {}
        fields = self.fields()
        for field in fields:
            description = self.describe(field)
            if description:
                schema[field.name] = description
        self._schema = schema
    return schema
