-Fixed error handling serializing invalid JSON in certain cases

This commit is contained in:
James Newton-King
2012-08-05 14:20:17 +12:00
parent 689f1a763b
commit 64414169eb
6 changed files with 82 additions and 3 deletions
@@ -804,6 +804,9 @@ To fix this error either change the environment to be fully trusted, change the
{
ClearErrorContext();
if (writer.WriteState == WriteState.Property)
writer.WriteNull();
while (writer.Top > initialDepth)
{
writer.WriteEnd();