-Added DefaultValueHandling to JsonSerializer. Option to not write default values when serializing object

-Added JsonSerializerSettings and overloads to JavaScriptConvert.SerializeObject and JavaScriptConvert.DeserializeObject
-Performance improvements
This commit is contained in:
JamesNK
2008-09-14 10:30:38 +00:00
parent b991969d65
commit e8654d8c03
13 changed files with 442 additions and 117 deletions
+6 -7
View File
@@ -207,14 +207,13 @@ namespace Newtonsoft.Json
if (Formatting == Formatting.Indented)
{
_writer.Write(Environment.NewLine);
// for each level of object...
for (int i = 0; i < Top; i++)
// levels of indentation multiplied by the indent count
int currentIndentCount = Top * _indentation;
for (int i = 0; i < currentIndentCount; i++)
{
// ...write the indent char the specified number of times
for (int j = 0; j < _indentation; j++)
{
_writer.Write(_indentChar);
}
_writer.Write(_indentChar);
}
}
}