We have a type defined in C# that that we are using the JavaScriptSerializer to get down to the client. On the client we have a JavaScript implementation of that type including a JavaScript implementation of its methods.
I am trying to use $create to create the Component and populate with the serialised JSON from the server like so.
$create(My.Toolkit.Web.MyDate, this._state.Value, null, null) The trouble is the property names of the C# class are SentenceCased and the JavaScript ones camelCased. The Atlas code (Sys$Component$_setProperties) that matches the JSON to the get_ and set_ functions on My.Toolkit.Web.MyDate does not seem to able to map from the SentenceCased version to the javascript camelCased versions.
Now I could just change the Javascript to be the same case but that seems wrong. In the past I have used a JavaScriptConverter to change the JSON sent down, to be compatible with the Javascript member names. Is this the correct way? I looked at the serializer in Reflector and it would seem that the only attribute based control I have is to Ignore elements
TIA
Paddeo