well,
i have a really simple class:
public class Channel : IContent
{
public Guid Guid { get; set; }
public string Title { get; set; }
public string Alias { get; set; }
public void Set()
{
// SAVE JSON DATA
using (System.IO.StreamWriter writer = new System.IO.StreamWriter(string.Join("", this.Guid, ".jsv")))
{
writer.Write("{ \"Title\":", this.Title, "}");
}
}
}
Serializing i could do as shown in code,
but how can i load that back into the class? that is the actual question.
Json.NET. No, seriously you need a JSON serializer. Just pick one that you like. The 3 that have been listed work great. And make sure you read this article to better understand why you need a JSON serializer.