title: Fatal error: Dictionary<String, Any> does not conform to Decodable because Any does not conform to Decodable
body: <p>I'm trying to use swift 4 to parse a local json file:</p>
  
  <pre><code>{
      "success": true,
      "lastId": null,
      "hasMore": false,
      "foundEndpoint": "https://endpoint",
      "error": null
  }
  </code></pre>
  
  <p>This is the function I'm using:</p>
  
  <pre><code>    func loadLocalJSON() {
  
          if let path = Bundle.main.path(forResource: "localJSON", ofType: "json") {
              let url = URL(fileURLWithPath: path)
  
              do {
                  let data  = try Data(contentsOf: url)
                  let colors = try JSONDecoder().decode([String: Any].self, from: data)
                  print(colors)
              }
              catch { print("Local JSON not loaded")}
          }
      }
  }
  </code></pre>
  
  <p>but I keep getting the error: </p>
  
  <blockquote>
    <p>Fatal error: Dictionary does not conform to Decodable
    because Any does not conform to Decodable.</p>
  </blockquote>
  
  <p>I tried using the "AnyDecodable" approach on this stackoverflow page: <a href="https://stackoverflow.com/questions/44603248/how-to-decode-a-property-with-type-of-json-dictionary-in-swift-4-decodable-proto">How to decode a property with type of JSON dictionary in Swift 4 decodable protocol
  </a>
  but it jumps to the 'catch' statement:   <code>catch { print("Local JSON not loaded")</code> when being used. Does anyone know how to parse this JSON data in Swift 4?</p>