title: JSON.stringify, change the case of the key
body: <p>I'm consuming a web service that returns json, and storing the json in a local variable. The json represents a simple business object such as:</p>
  
  <pre><code>var entry = {
    "FirstName": "John",
    "LastName": "Doe",
    ....
  };
  </code></pre>
  
  <p>The casing is like that because it matches up with the property names from the .net class, as per our naming convention.</p>
  
  <p>When a change a few of these properties and pass back the json, the web service now expects camel case (again, as per our naming convention for method parameters) instead of the pascal case initially returned.</p>
  
  <pre><code>var entry = {
    "firstName": "John",
    "lastName": "Doe",
    ....
  };
  </code></pre>
  
  <p>This of course doesn't work.</p>
  
  <p>I'm using <code>JSON.stringify</code> to send the json back to the web service as a string, and I was looking to see if there was an easy way to change the key to camel case. However, it looks like I can only use the replacer param to work with the value.</p>
  
  <p>I could change the serialization of the class, but lets pretend that's not an option. Any ideas?</p>
  
  <p>Thanks.</p>