jed_fox1’s avatarjed_fox1’s Twitter Archive — № 652

    1. …in reply to @stroughtonsmith
      @stroughtonsmith @BigZaphod You could make a struct wraps the dictionary, and assign properties in the initializer. If you make the initializer failable (init?(...)) you could just return nil if something is missing that needs to be there.
  1. …in reply to @jed_fox1
    @stroughtonsmith @BigZaphod Additionally, if your data source is JSON,you could use the JSONDecoder API to decode it directly into Swift objects.