frankinstien
frankinstien
I found where the problem is and the Reflection class' FastCreateInstance only creates class objects whose constructor has no parameters. My class RootDescriptor has many fields whose setters are protected...
Also, ServiceStack.Text Json serializer is able to create objects whose constructors have parameters. I'm going to take a look at that source code and find out how they resolve fields...
While that does allow for the class object to be created it doesn't initialize the fields correctly, whereas ServiceStack.Text does. The problem with ServiceStack.Text, for my application at least, is...
JSON.FillObject() did not work. A quick way of doing this is to have some kind of registration of a class and map the constructor parameters to the public fields and...
I thought of that but it would require a lot of coding for all the classes I'd need to use. I like to code once and not have to perpetually...
I still need to map the parameter to the field and extract the data from the json or am I missing something?
Another way to automate this is to modify the class through reflection to add a method that can accept a surrogate and dynamically create the surrogate class which is then...
Yes, that is the problem I'm having. Some fields are not mutable but can be read.
The JSON.Parse does return a field value map which could be used as a pseudo surrogate. I'm going to try a few ideas. I'm going to use that collection from...
Yes, I know that...