requireSchema function
Throws an UnsupportedSchemaException (naming what) unless json's
schema is version (default kSchemaVersion).
Implementation
void requireSchema(Json json, {String what = 'The document', int version = kSchemaVersion}) {
final schema = json['schema'];
if (schema is num && schema == version) return;
throw UnsupportedSchemaException(schema, what: what);
}