0

I'm curious to understand the workings of the Codable protocol and how at compilation time it checks if the children properties of the object are Codable as well. I'm looking for ways to incorporate that into my own protocols and any insights into this would be awesome since I cannot find any online!

Thanks in advance!

BJ Beecher
  • 195
  • 1
  • 5
  • 3
    The automatic synthesis of `Codable` conformance is done via compiler magic, something you can't do in your own protocols. – Sweeper Feb 19 '21 at 07:15
  • Look at this article and sample code: https://developer.apple.com/documentation/foundation/archives_and_serialization/using_json_with_custom_types?language=objc – vadian Feb 19 '21 at 09:46
  • Thank's Sweeper.. I was afraid that that might be the case. Thanks for the quick responses! – BJ Beecher Feb 19 '21 at 16:16

0 Answers0