title: why can't JavaScriptSerializer serialize internal properties?
body: <p>I've been serializing custom type which has some internal properties but when serializing, it seems that using <code>System.Web.Script.Serialization.JavaScriptSerializer</code> <code>serialize</code> method do not serialize internal properties (as it skips the internal property in serialized string).
  It can easily be understandable from the following code and output : </p>
  
  <pre><code>public class MyClass
  {
      public string Property1 { get; set; }
  
      internal string Property2 { get; set; }
  
      public string Property3 { get; set; }
  }
  
  JavaScriptSerializer mySerializer = new JavaScriptSerializer();
  string jsonString = mySerializer.Serialize(new MyClass()
  {
              Property1 = "One",
              Property2 = "Twp",
              Property3 = "Three"
  });
  </code></pre>
  
  <p>The jsonString has following value : </p>
  
  <pre><code>{"Property1":"One","Property3":"Three"}
  </code></pre>
  
  <p>In output, you can see that serialized string do not have Property2 which is internal property. Is there something logic behind it for not supporting internal property in serialization?</p>
  
  <p>What would be the workaround to serialize internal property(except changing internal to public modifier)?</p>