title: Error "The JSON value could not be converted to System.String. Path: $[1].Interests[1].Meta[9].Content | LineNumber: 0 | BytePositionInLine: 10073."
body: <pre><code>public Class Employee{
  
    public string Name { get; set; }
  
    [Column(TypeName = &quot;jsonb&quot;)]
    public List&lt;Section&gt; Sections { get; set; }
  
  }
  
  public Class Sections{
  
     public string Booking { get; set; }
  
  
    [Column(TypeName = &quot;jsonb&quot;)]
    public List&lt;Interest&gt; Interests { get; set; }
  
  }
  
  public Class Interest{
  
    public string Title { get; set; }
  
    public List&lt;Meta&gt; Meta { get; set; }
  
  
    public List&lt;WithAlt&gt; Images { get; set; }
  }
  
  public Class Meta{
  
        public string Type { get; set; }
  
       public string Content { get; set; }
  
  }
  
  public Class WithAlt{
  
       public string content { get; set; }
  
       public string Alt { get; set; }
  
  }
  </code></pre>
  <p>I fetch data from the Employee table</p>
  <p>Employee while fetching the data  <strong>Sections</strong> <code>Column</code> I got</p>
  <pre><code>The JSON value could not be converted to System.String. Path: $[1].Interests[1].Meta[9].Content | LineNumber: 0 | BytePositionInLine: 10073. 
  </code></pre>
  <p>Error at</p>
  <pre><code>public Task&lt;Employee&gt; CheckEmployee(string name){
  
  // error throw Line
  var query= await catalogDbContext.Employee
               .Where(i.Name === name)
              .FirstOrDefault();
  }
  </code></pre>
  <p>Not for all value but some value that <code>List&lt;Section&gt;</code>  or
  <code>List&lt;Interest&gt;</code> or <code>List&lt;Meta&gt;</code> or <code>List&lt;WithAlt&gt;</code> have null value</p>
  <p>When I manually add the value to sections column  bellow</p>
  <pre><code>{
    &quot;Booking&quot;: &quot;&quot;,
    &quot;Interests&quot;:[
     {
         &quot;Title&quot;:&quot;&quot;,
  
         &quot;Meta&quot;:[
  
            { 
             
               &quot;Type&quot; : &quot; &quot;, 
            
                &quot;Content&quot; : &quot; &quot;
            }
           ],
  
       &quot;Images&quot; : [
        {
           &quot;content&quot; : &quot; &quot;,
  
           &quot;alt&quot; : &quot; &quot;
        }
      ]
    }
  ],
  
    }
  </code></pre>
  <p><strong>it will not throw the error</strong></p>
  <p>Are there any way to define the default value to the above fields using code first approach</p>
  <p>when I initialize Sections property like</p>
  <pre><code>public List&lt;Section&gt; Sections { get; set; }={};
  </code></pre>
  <p>it shows the following error</p>
  <pre><code>Can only use array initializer expressions to assign to array types. Try using a new expression instead.
  </code></pre>
  <p>and also</p>
  <pre><code>public List&lt;Section&gt; Sections { get; set; }= new List&lt;Section&gt; Sections();
  </code></pre>
  <p>and</p>
  <pre><code>public List&lt;Meta&gt; Meta { get; set; }= = new List&lt;Meta&gt;();
  </code></pre>
  <p>and</p>
  <pre><code>public List&lt;WithAlt&gt; Images { get; set; }= new List&lt;WithAlt&gt;();
  </code></pre>
  <p>throw <code>Error &quot;The JSON value could not be converted to System.String. Path: $[1].Interests[1].Meta[9].Content | LineNumber: 0 | BytePositionInLine: 10073.&quot;</code></p>