title: InvalidCastException: Specified cast is not valid in Unity
body: <p>I generate a JSON representation from type Car and then create a System.Object from that json. When I try to explicitly convert that object to type Car it shows an error "InvalidCastException: Specified cast is not valid". Can anyone explain to me the reason?</p>
  
  <pre><code>using System;
  using UnityEngine;
  [Serializable]
  class Car
  {
      public string type;
  }
  public class Test : MonoBehaviour
  {   
      void Start()
      {
          Car car = new Car();
          car.type = "BMW";
  
          string json = JsonUtility.ToJson(car);
          System.Object @object = JsonUtility.FromJson&lt;System.Object&gt;(json);
          car = (Car)@object;
          Debug.Log(car.type);
      }
  }
  </code></pre>