title: How to decode a codable property in two data types simply if one of them always is empty?
body: <p>I receive from a post request, this JSON:</p>
  
  <pre><code>"clinic_info": {
                  "city": "Querétaro",
                  "state": "Querétaro",
                  "country": "México",
                  "phone": null,
                  "ext": null,
                  "coords": "20.6046089,-100.37826050000001",
                  "location": "Querétaro"
              }
  </code></pre>
  
  <p>But when it is empty the JSON is:</p>
  
  <pre><code>"clinic_info": []
  </code></pre>
  
  <p>This produces an error: Expected to decode Dictionary but found an array instead.</p>