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

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -