title: Omitting a field from POCO class serialization for OpenBadge
body: <p>I have the following POCO class:</p>
  
  <pre><code>public class BadgeClass
  {
      [Key]
      [ScriptIgnore()]
      //Internal ID not used for sending information to the OpenBadges API
      public int BadgeID { get; set; }
  
      //The name of the achievement.
      [StringLength(128)]
      public string Name { get; set; }
  
      //A short description of the achievement.
      [StringLength(128)]
      public string Description { get; set; }
  
      //URL of an image representing the achievement. Should be a square and in PNG format. Maximum size is 256kb.
      public string Image { get; set; }
  
      //URL of the criteria for earning the achievement. If the badge represents an educational achievement, consider marking 
      //up this up with LRMI
      public string Criteria { get; set; }
  
      //URL of the organization that issued the badge. Endpoint should be an IssuerOrganization
      public string Issuer { get; set; }
  
      //List of objects describing which educational standards this badge aligns to, if any.
      //public List&lt;AlignmentObject&gt; Alignments { get; set; }
  
      //List of tags that describe the type of achievement.
      //public List&lt;string&gt; Tags { get; set; }
  }
  </code></pre>
  
  <p>I am trying to serialize the object into JSON and write to local file using the following code:</p>
  
  <pre><code>var json = JsonConvert.SerializeObject(newBadge);
  System.IO.File.WriteAllText(@"c:\test.json", json);
  </code></pre>
  
  <p>This is working so much in that the JSON file is being created but I want to omit the BadgeClassID field from the serialization. I thought that the ScriptIgnore marker would have taken care of this. Is there a way to do this?</p>