Rounding Numbers

Sep 29, 2011 at 6:58 PM

I'm looking for a convenient way to have all floating point numbers rounded to N decimal places while being serialized to JSON.  I can see that if I'm using JsonSerializer I can do this by adding a JsonConverter derived type.  Unfortunately, I have a code base that generates a JObject that is serialized via a JsonTextWriter.  Is there a place to hook-in a converter I've missed?