Custom encoding and decoding JSON

In our last Working with JSON series (Part 1, Part 2 and Part 3), we explore various items: Codable protocol, which contains two other protocols: Encodable and Decodable How to decode a JSON data object into a readable Swift struct Usage of custom keys Custom objects creation Arrays Different top …

Working with JSON – Part 1

DISCLAIMER: In this series of posts you’ll learn to work with JSON, not with JASON, the evil character from Friday the 13th series. Besides, working with JSON has become a pleasure since Swift 4… while JASON keeps being mean. So, drop your hockey mask and start coding!

Document your functions

Did you know that pressing ⌥ + ⌘ + / in any function declaration displays an auto-generated document template for that function? You can also add extra lines to that template using Swift’s version of Markdown, which is an extremely useful tool to document our code, for the sake of us, the future us …