title: Deserializing json array into .net class
body: <p>I'm having problems deserializing some json data, getting InvalidCastExceptions and the like.</p>
  
  <p>Can anyone point me in the right direction?  </p>
  
  <p>Here's the json i'm wanting to deserialize;</p>
  
  <blockquote>
    <p>[{"OrderId":0,"Name":"Summary","MaxLen":"200"},{"OrderId":1,"Name":"Details","MaxLen":"0"}]</p>
  </blockquote>
  
  <p>Here's my code;</p>
  
  <pre><code>  Public Class jsTextArea
      Public OrderId As Integer
      Public Name As String
      Public MaxLen As String
    End Class
  
  Dim js As New System.Web.Script.Serialization.JavaScriptSerializer
  Dim rawdata = js.DeserializeObject(textAreaJson)
  Dim lstTextAreas As List(Of jsTextArea) = CType(rawdata, List(Of jsTextArea))
  </code></pre>