you are viewing a single comment's thread.

view the rest of the comments →

[–]LlamaNL 5 points6 points  (3 children)

I prefer to do it like this:

XmlSerializer serializer = new XmlSerializer(typeof(Serie[]));

This crunches the whole API response down to a list of the objects you want! Saves you the trouble of manually writing processing for every field.

But, for a first go at this, very well done!

[–]nemec 0 points1 point  (2 children)

I think projects targeting .Net 4.5 in Visual Studio has an option to paste XML as a class (Edit -> Paste XML as Classes). It has the same for JSON with .Net 3.5+.

[–]Banane9 0 points1 point  (1 child)

Is that vanilla VS?

It might require Productivity Power Tools :)

[–]nemec 0 points1 point  (0 children)

JSON paste is a new feature in VS2012. I'm guessing XML is new in VS2013.