Are there options with Json.NET that can have it deserialize inconsistent json types into objects? -


an example consuming json api. api not consistent in how returns json. have author , has property of books[]. api unfortunately choosing return author.books (of type book) in cases when there 1 book. prefered method return 1 book inside author.books[].

json.net understandably throws serialization exception when try have deserialize chunk of json , finds "author":{"book":{... mixed in "author":{"book":["...

is there way around this?

does answer question?

deserializing json when array , object


Comments

Popular posts from this blog

How can I edit my VIM config so that Vim treats ".ejs" files the same as it currently treats my html files? -

Python __call__ special method practical example -