Wednesday, February 15, 2012

Joel suggests...

Serializing using a stream should side step any default string size limitations. You can do it like this:

var serializer = new Newtonsoft.Json.JsonSerializer();

var writer = new StringWriter();

serializer.Serialize(writer, obj);

writer.Flush();

string serializedObject = writer.GetStringBuilder().ToString();

No comments:

Post a Comment