Skip to content

Instantly share code, notes, and snippets.

@andrewconnell
Created December 9, 2014 02:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewconnell/bbf5bd4841da058d023d to your computer and use it in GitHub Desktop.
Save andrewconnell/bbf5bd4841da058d023d to your computer and use it in GitHub Desktop.
XML vs. JSON Serialization in Server Side Code - Snippet 4
var spTaskJsonResponse = JsonConvert.DeserializeObject<SpTaskJsonCollection>(responseString);
List<SpTask> tasks = new List<SpTask>();
foreach (var spListitem in spTaskJsonResponse.Data.Results) {
SpTask task = new SpTask {
Id = spListitem.Id.ToString(),
Title = spListitem.Title,
Status = spListitem.Status,
Priority = spListitem.Priority
};
tasks.Add(task);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment