-Fixed JTokenWriter not writing comments

-Fixed BsonWriter not erroring when writing non-BSON compatible content
This commit is contained in:
JamesNK
2009-12-20 00:16:02 +00:00
parent b6ff852467
commit f574bfbf83
5 changed files with 239 additions and 22 deletions
+6 -1
View File
@@ -180,10 +180,15 @@ namespace Newtonsoft.Json.Linq
public override void WriteRaw(string json)
{
base.WriteRaw(json);
// hack
AddValue(JValue.CreateRaw(json), JsonToken.Raw);
}
public override void WriteComment(string text)
{
base.WriteComment(text);
AddValue(JValue.CreateComment(text), JsonToken.Comment);
}
/// <summary>
/// Writes a <see cref="String"/> value.
/// </summary>