title: DataContractJsonSerializer ReadObject Exception
body: <p>I am following the accepted answer of <a href="https://stackoverflow.com/questions/560575/asp-net-mvc-how-to-pass-json-object-from-view-to-controller-as-parameter">ASP.NET MVC How to pass JSON object from View to Controller as Parameter</a>.  Like the original question, I have a simple POCO.</p>
  
  <p>Everthing works fine for me up until the DataContractJsonSerializer.ReadObject method.  I am getting the following exception:  </p>
  
  <blockquote>
    <p>Expecting element 'root' from
    namespace ''.. Encountered 'None' 
    with name '', namespace ''.</p>
  </blockquote>
  
  <pre><code> Public Overrides Sub OnActionExecuting(ByVal filterContext As ActionExecutingContext)
      If filterContext.HttpContext.Request.ContentType.Contains("application/json") Then
          Dim s As System.IO.Stream = filterContext.HttpContext.Request.InputStream
  
          Dim o = New DataContractJsonSerializer(RootType).ReadObject(s)
  
          filterContext.ActionParameters(Param) = o
      Else
          Dim xmlRoot = XElement.Load(New StreamReader(filterContext.HttpContext.Request.InputStream, filterContext.HttpContext.Request.ContentEncoding))
          Dim o As Object = New XmlSerializer(RootType).Deserialize(xmlRoot.CreateReader)
          filterContext.ActionParameters(Param) = o
      End If
  End Sub
  </code></pre>
  
  <p>Any ideas?</p>