title: Can a JSON object with 2 different data types for the same property be deserialized with the same deserialization call?
body: <p>Let say I have the following 2 JSON objects that are returned from the same AJAX call depending on the parameters passed in.</p>
  
  <p>The first one returns a string array for the <strong><em>child</em></strong> property:</p>
  
  <pre><code>{
      parent: {
          child: [
              "item 1",
              "item 2",
              "item 3",
          ]
      }
  }
  </code></pre>
  
  <p>And the second one returns an object array for the <strong><em>child</em></strong> property:</p>
  
  <pre><code>{
      parent: {
          child: [
              {
                  "attribute1": "Attribute 1",
                  "attribute2": "Attribute 2",
                  "attribute3": "Attribute 3"
              },
              {
                  "attribute1": "Attribute 1",
                  "attribute2": "Attribute 2",
                  "attribute3": "Attribute 3"
              },
              {
                  "attribute1": "Attribute 1",
                  "attribute2": "Attribute 2",
                  "attribute3": "Attribute 3"
              },
          ]
      }
  }
  </code></pre>
  
  <p>Is it possible to deserialize either of these into the same model somehow? Maybe where there are 2 different properties for <strong><em>child</em></strong> (like <strong><em>ChildString</em></strong> &amp; <strong><em>ChildObject</em></strong>) that are populated accordingly depending on the type?</p>
  
  <p>I'm currently using <a href="https://github.com/kevin-montrose/Jil" rel="nofollow noreferrer">Jil</a> for deserializing, but I'm open to others if need be.</p>
  
  <p>Thanks!</p>