title: JavaScriptSerializer [ScriptIgnore] not effective on virtual properties?
body: <p>I have returning a Json(myObj) action result. The myObj is of type Badge</p>
  
  <p>The only two objects that Badge has that could cause a loop from a serializer, are:</p>
  
  <pre><code>public class Badge
  {
      public Badge() { }
  
      public Badge(String Name, String Description)
      {
          this.Name = Name;
          this.Description = Description;
      }
  
      [ScriptIgnore]
      public virtual BadgeType BadgeType { get; set; }
      [ScriptIgnore]
      public virtual ICollection&lt;User&gt; Users { get; set; }
  
      public int ID { get; set; }
      public string Name { get; set; }
      public string Description { get; set; }
      public string PrerequisiteCriteriaRef { get; set; }
  
      //PrerequisiteID
  
      public static Badge CreateForSeeder(BaseDBContext db, String Name, String Description, int TypeID)
      {
          Badge b = new Badge();
          b.Name = Name;
          b.Description = Description;
          b.BadgeType = db.BadgeTypes.Where(x =&gt; x.TypeID == TypeID).FirstOrDefault();
          return b;
      }
  }
  </code></pre>
  
  <p>Which I've given the attribute, but it's not helping out at all...?</p>