title: Json .NET Serialization - change the property value
body: <p>Good day!</p>
  
  <p>I am currently using the Newtonsoft Json Serializer through the following code: </p>
  
  <pre><code>        private string serializeAndIgnoreEmail(UserMembership obj)
          {
              var json = JsonConvert.SerializeObject(obj, Formatting.Indented,
                  new JsonSerializerSettings() { ContractResolver = new DocumentIdContractResolver() });
              return json;
          }
          private class DocumentIdContractResolver : CamelCasePropertyNamesContractResolver
          {
              protected override List&lt;MemberInfo&gt; GetSerializableMembers(Type objectType)
              {
                  return base.GetSerializableMembers(objectType).Where(o =&gt; o.Name != "Email").ToList();
              }
          }
  </code></pre>
  
  <p>Everytime I need to serialize an object I call the 'serializeAndIgnoreEmail' method. I now want to replace the content of each property with it's encrypted version and I don't know where to do this.</p>
  
  <p>My guess would be to override a method in the 'DocumentIdContractResolver', but there are so many CreateBlahBlahBlah ones, that I find it very hard to work with them.</p>
  
  <p>Is this the right approach, to continue modifying the ContractResolver or should I try something else?</p>
  
  <p>Thank you!</p>