18 from typing
import Optional, Type, Final
24 Defines how json filed should be represented in python
29 jsonName: Optional[str] =
None,
30 pythonType: Optional[Type] =
None,
31 collectionType: Optional[Type] =
None,
32 isEncodable: bool =
True,
33 isDecodable: bool =
True
36 self.jsonName: Final = jsonName
37 self.pythonType: Final = pythonType
38 self.collectionType: Final = collectionType
39 self.isEncodable: Final = isEncodable
40 self.isDecodable: Final = isDecodable
44 Checks if descriptor represents a list or not
48 bool -> True if it does, False otherwise
51 return self.collectionType
is not None and issubclass(self.collectionType, list)