Is the "javascript object" actually an object from
JS? Or is it a serialized .NET object?
In the case of opSerializer.Deserialize<Person>(opInput) the type parameter has to be a type, it can't be a parameter.
Is there a problem with the code you have posted or are you looking for an alternative to some of what you have there?
I suspect that if you are trying to translate a
JS object into .NET you don't have much choice but to test each property by name. The
JS object doesn't have strongly typed properties so you can't test by type. (Unless I'm missing something here.)
-Peter