iOS Generic type for codable property in Swift : <p>I need to get a generic variable for a struct for parsing a JSON </p>

<p>but there is an  error that I am getting
 <strong>Type 'BaseJsonModel' does not conform to protocol 'Codable</strong></p>

<p>Below is my struct</p>

<pre><code>  struct BaseJsonStruct&lt;T&gt;: Codable {
    let info: String
    let data: T
 }
</code></pre>

<p>Error:- Type 'BaseJsonModel' does not conform to protocol 'Codable'</p>
