I need to get the properties of my class as a dictionary. For simplicity, I created a protocol which has a default implementation as follows:
protocol ListsP
My solution is to use
Mirror(self, children: properties, ancestorRepresentation: Mirror.AncestorRepresentation.generated)
Instead of
Mirror(representing: self)
properties is a DictionnaryLiteral object containing the properties I want to be mirrored.