title: JSON Serializer object with internal properties
body: <p>I have class with some internal properties and I would like to serialize them into json as well. How can I accomplish this?
  For example </p>
  
  <pre><code>public class Foo
  {
      internal int num1 { get; set; }
      internal double num2 { get; set; }
      public string Description { get; set; }
  
      public override string ToString()
      {
          if (!string.IsNullOrEmpty(Description))
              return Description;
  
          return base.ToString();
      }
  }
  </code></pre>
  
  <p>Saving it using </p>
  
  <pre><code>Foo f = new Foo();
  f.Description = "Foo Example";
  JsonSerializerSettings settings = new JsonSerializerSettings() { TypeNameHandling = TypeNameHandling.All };
  
   string jsonOutput = JsonConvert.SerializeObject(f, Formatting.Indented, settings);
  
   using (StreamWriter sw = new StreamWriter("json_file.json"))
   {
       sw.WriteLine(jsonOutput);
   }
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>{  
  "$type": "SideSlopeTest.Foo, SideSlopeTest",
  "Description": "Foo Example"
  }
  </code></pre>