I am getting a message on the network using JSON.NET. The message format is somewhat dynamic, For example: The problem I have is in JSON.NET, I do not know Is that How to find the name of the class (NameType1 / MessageType2 / etc), to remove it as an example of a square without repeating it twice. I have suggested some options; What I am currently using is to use a container class in which the name of the message and the actual JSON message is sorted for the string, but it is useless. Another method I believe is deserializing in string / string dictionary and then executing the population of the class on their own, which seems to be messy and unnecessary to consider Jason.Net. I can do this for ... as long as I know the class for the first time. I'm really hoping that message is an easy way to detect the name of an JSON.NET class by checking the property and after checking it, continue to populate a square. Property. Thanks for the help! JSON can deserialize in a well known class only you specify data layout (i.e. class / type)
No comments:
Post a Comment