This project has moved and is read-only. For the latest updates, please go here.

Camel Case for most properties, but not all.

Mar 7, 2012 at 11:31 AM
Edited Mar 7, 2012 at 11:33 AM


I have a model something like below.

I want all of the properties to be serialized with camelCase keys, but the items in the Names dictionary need to keep their original casing, as they're actual strings rather than variable names. What is the best way to do this?

class Model
    public string Property1 { get; set; }
    public string Property2 { get; set; }
    public string Property3 { get; set; }
    public IDictionary<string, string> Names { get; set; }


Oct 10, 2014 at 2:25 PM
I know this is quite an old thread. But I was wondering if you have ever found a solution.