WriteRaw() public method

Writes raw JSON.
public WriteRaw ( string json ) : void
json string The raw JSON to write.
return void
コード例 #1
0
        public void WriteRaw()
        {
            ExceptionAssert.Throws<JsonWriterException>(() =>
            {
                MemoryStream ms = new MemoryStream();
                BsonWriter writer = new BsonWriter(ms);

                writer.WriteStartArray();
                writer.WriteRaw("fail");
            }, "Cannot write raw JSON as BSON. Path ''.");
        }
コード例 #2
0
ファイル: BsonWriterTests.cs プロジェクト: adbre/jsoncf
        public void WriteRaw()
        {
            MemoryStream ms = new MemoryStream();
              BsonWriter writer = new BsonWriter(ms);

              writer.WriteStartArray();
              writer.WriteRaw("fail");
        }