Parsing json which has an object in two formats
<p>I have a json object as below.</p>

<pre><code>{
    "products": [
        {
            "details": {
                "name": "xxx",
                "price": "100rs"
            },
            "description": "Buy this product"

        }, {
            "details": [{
                "name": "yyy",
                "price": "200rs"
            }],
            "description": "another project"
        }
    ]
}
</code></pre>

<p>Here the <code>details</code> are presented in 2 formats. How can I create a POJO (Plain Old Java Object) class of this to use for the Retrofit api?</p>