c# - wcf deserialize enum as string -


I am trying to use a free web service using WCF I have no control over the format of the web service No, so I have to do some work here and there.

This is my code (obviously the name has changed):

   

and this is the data that deserialization fails:

  {"id": 123456, "name": "John doe", Finally, the exception was thrown:  

There was an error deserializing the type of service. Fu value 'bar' can not be parsed as 'int64' type. / P>

I do not want to switch to using XMLSlizer, because of its many other deficiencies, it

edit : I Properties of string values How do I behave in a form?

How can I do WCF (or, well, data contrastistilizer)? It seems impossible, and behavior is the way that is designed by Microsoft, To not give us options, take the support of hacks. The way in which it describes the Somori is the only way to get string anonym with JSON and WCF.

This is a silly Hole can be questioned.

If you

  [DataMember (name = "foo")] private String foo {get; Private set; } Public Foo Foo {get Foo.Parse (foo); }}  

?


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -