Hello Eugene, thanks for the awesome library. It has come in very handy!
I wanted the ability to see nicely formatted responses in the Firebug
console while debugging, so I made a little mod that does just that. In
DirectResponseBase.ToJson() I simply changed:
using (var writer = new StringWriter()) {
serializer.Serialize(writer, this);
jsonResponse = writer.ToString();
}
to:
var sw = new StringWriter();
using (JsonWriter jsonWriter = new JsonTextWriter(sw)) {
jsonWriter.Formatting = DirectConfig.Debug ?
Formatting.Indented : Formatting.None;
serializer.Serialize(jsonWriter, this);
jsonResponse = sw.ToString();
}
Works perfectly and uses the web.config debug value to control formatting.
Hopefully you'll also find it useful and maybe add it!
Thanks again.
Original issue reported on code.google.com by bmoes...@gmail.com on 16 Mar 2010 at 5:39
Original issue reported on code.google.com by
bmoes...@gmail.com
on 16 Mar 2010 at 5:39