This is like a follow-up question to this one.
Basically what I'm doing is exposing some fields on some UI to some user.
These fields are established based on the parameter list of a given objects constructor. The user has the options to choose which object the UI is displaying by, oh I don't know, let's say picking an object from a drop down list or something.
Once the fields are filled in and the user submits, I know the Object Type I need to create, I know the parameter names its constructor takes and the parameter types. I get a JSON string on the server (C# code behind).
The object potentially can have many more properties, public or private, than what the constructor exposes.
Can I use still use JavaScript or JSON deserialization to get my object if the JSON string doesn't contain data for all properties?
I'm not sure if I can specify default values somehow by property attributes or something...
Thanks.