title: SwiftUI - Type 'Service' does not conform to protocol 'Decodable'
body: <p>I'm playing around with SwiftUI on a little app I'm building but I'm running into an issue with Codable and I'm getting a few errors. </p>
  
  <p>I have a JSON file which looks like this</p>
  
  <pre><code>[
      {
          "id": "",
          "name": "services",
          "items": [
              {
                  "id": 0
                  "businessName": "Some Name",
                  "businessTelephone": "01234567890",
                  "businessEmail": "email@gmail.com",
                  "businessWebsite": "website.com",
                  "businessLocation": { "latitude": "54.137256", "longitude": "-1.524727" },
                  "travelLimit": 50,
                  "description": "A description about some business",
                  "categories": ["Category 1"]
              }
      }
  ]
  </code></pre>
  
  <p>I have a struct that looks like this </p>
  
  <pre><code>struct Service: Hashable, Codable, Identifiable { 
  
      var id: Int
      var businessName: String
      var businessTelephone: String
      var businessEmail: String
      var businessWebsite: String
      var businessLocation: Array&lt;Any&gt;
      var travelLimit: Int
      var description: String
      var categories: [Category]
  
      enum Category: String, CaseIterable, Hashable, Codable {
  
          case category1 = "Category 1"
          case category2 = "Category 2"
  
      }
  
  }
  </code></pre>
  
  <p>However, I get the following errors </p>
  
  <pre><code>Type 'Service' does not conform to protocol 'Decodable'
  Type 'Service' does not conform to protocol 'Encodable'
  Type 'Service' does not conform to protocol 'Equatable'
  Type 'Service' does not conform to protocol 'Hashable'
  </code></pre>