I'm having a bit of trouble using ServiceStack's DataContract API + *ServiceClient to get the appropriate deserialization out of a standard XML / JSON REST service. For instance if we take the following output (use accept header to get json):
http://rxnav.nlm.nih.gov/REST/RxTerms/rxcui/198440/allinfo
How would you go about structuring a model object to handle both the JSON output and hte XML output from that service (uses accept headers to get json)?
Would you be required to provide an explicit "Name" parameter in the DataContract and DataMember attributes to get the appropriate deserialization?
How does ServiceStack compare the XML / JSON object names to the Property Names in the model? Are they case sensitive?
Can we get some sort of generic Func delegate API in JsonRestClientAsync to seamlessly integrate our own deserialization mechanisms where we have 3rd party format's to deal with?
Yes I know I can use ServiceStack.Text to do explicit deserialization. I pretty much take on that dependency in all my .NET projects :-)
Thanks,
Anuj