add toJSON to schema, to support retrieving raw schema