def from_json_compatible(schema, dct):
kwargs = {}<EOL>for key in dct:<EOL><INDENT>field_type = schema._fields.get(key)<EOL>if field_type is None:<EOL><INDENT>raise ParseError("<STR_LIT>" % (schema.__name__, key))<EOL><DEDENT>kwargs[key] = field_type.load(dct[key])<EOL><DEDENT>return schema(**kwargs)<EOL>
Load from json-encodable