Dictionary to dataclasses with inheritance of classes
问题 I have the following class @dataclass_json @dataclass class Input: sources: List[Sources] =None Transformations: List[str] =None As well as: @dataclass_json @dataclass class Source: type: str =None label: str =None path: str = None and the two subclasses: @dataclass_json @dataclass class Csv(Source): csv_path: str=None delimiter: str=';' and @dataclass_json @dataclass class Parquet(Source): parquet_path: str=None Given now the dictionary: parquet={type: 'Parquet', label: 'events', path: '/...