private static Document GetDocument(string input) { var xdoc = XDocument.Parse(input); var doc = new Document { Title = xdoc.Root.Element("title").Value, Text = xdoc.Root.Element("text").Value }; return doc; }
private static string SerializeDocument(Document doc) { var serializedDoc = JsonConvert.SerializeObject(doc); return serializedDoc; }