Newtonsoft.Json.Bson.BsonWriter.WriteRaw C# (CSharp) Method

WriteRaw() public method

Writes raw JSON.
public WriteRaw ( string json ) : void
json string The raw JSON to write.
return void
        public override void WriteRaw(string json)
        {
            throw JsonWriterException.Create(this, "Cannot write raw JSON as BSON.", null);
        }

Usage Example

コード例 #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 ''.");
        }
All Usage Examples Of Newtonsoft.Json.Bson.BsonWriter::WriteRaw