Feb 16 2013

How to rename and remap fields with illegal json field names

I have used json2csharp to produce some nice c# class into which I can deserialize json. It is actually working as expected EXCEPT that json2csharp named some of the fields invalid_name . I renamed those to valid csharp names but when serialized those class are null. I found this other SO post... where one of the answerers said the following...
Keep in mind the class I have pasted below will not work directly, because of the naming of some of the fields in the json. You may have to rename them manually and map them.
This exactly describes my problem. Unfortunately, the answer gives no clues on actually HOW to "map them." So can someone tell me how to manually map some json arrays to c# classes. I am using RestSharp deserializers, btw. Any ideas?