How SwiftPM Parses Manifest File

SwiftPM uses Package.swift as a manifest file to capture information about the current package like, name of the package, its dependencies, targets, etc.,

»
Author's profile picture Bhargav Gurlanka on Swift

Error Handling Patterns In Swift

Error handling in Objective-C is mostly done through NSError object:

»
Author's profile picture Bhargav Gurlanka on Swift

Do Try to Catch Errors in JSON Parsing

There are 2 pain points in our parser code that we’ve written in our previous posts:

»
Author's profile picture Bhargav Gurlanka on Swift

Supporting Keypaths - JSON Parsing

Can we handle key paths (like the ones we’re used to in NSDictionary) while parsing JSON? That would be cool right? So, why wait, let’s implement it.

»
Author's profile picture Bhargav Gurlanka on Swift

Handling Optional Properties in JSON

In our previous versions of parser, there is no support for optionals. If any key transformation fails or if any key is missing or if the response contains nil values for keys, the whole parsing fails. This is not desired in most of the situations.

»
Author's profile picture Bhargav Gurlanka on Swift

Parsing Arrays in JSON

Till now we’ve successfully parsed simple JSON dictionaries along with value transformations. In this post, we’ll see how to parse array of objects.

»
Author's profile picture Bhargav Gurlanka on Swift

JSON Parsing With Value Transformers

In the last tutorial we’ve seen how to use functional concepts to parse JSON into Swift models. One of the main problems with that code is it doesn’t support value transformations, ie., changing the values coming from JSON before assigning them to the model. Let’s try to implement it.

»
Author's profile picture Bhargav Gurlanka on Swift

Functional JSON Parsing in Swift

There are so many good tutorials written on parsing JSON in swift. This is my take on the same.

»
Author's profile picture Bhargav Gurlanka on Swift

My Swift-PM Development Workflow

Recently I’ve started contributing to Swift Package Manager. Contributing to Open Source projects is really an awesome learning experience. This post is about my workflow for contributing to Swift-PM.

»
Author's profile picture Bhargav Gurlanka on Swift

Building swift toolchain on OS X and Ubuntu-15.10

Tl;Dr: Use utils/build-toolchain script in Swift repo to build the toolchain on both OS X and Ubuntu

»
Author's profile picture Bhargav Gurlanka on Swift