A Mirror
is a struct
used in the introspection of an object in Swift. Its most prominent property is the children array. One possible use case is to serialize a struct for Core Data
. This is done by converting a struct
into a NSManagedObject
.
The children
property of a Mirror
is an array of child objects from the object the Mirror instance is reflecting. A child
object has two properties label
and value
. For example a child might be a property with the name title
and the value of Game of Thrones: A Song of Ice and Fire
.