I love usingRefitto call web APIs in a nice type-safe manner. Sometimes though, APIs don’t want to cooperate with your strongly-typed hopes. For example, you might run into an API written by a hipster in a beanie, aka a dynamic-type enthusiast. I don’t say that pejoratively. Some of my closest friends write Python and Ruby.For example, I came across an API that returned a value like this:{"important":true}No problem, I defined a class like this to deserialize it to:publicclassImportantResponse{publicboolImportant{get;set;}}And life was good. Until that awful day that the API returned this:{"im
...
继续阅读
(13)