WriteRaw() public méthode

Writes raw JSON.
public WriteRaw ( string json ) : void
json string The raw JSON to write.
Résultat void
        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 ''.");
        }
Exemple #2
0
        public void WriteRaw()
        {
            MemoryStream ms = new MemoryStream();
              BsonWriter writer = new BsonWriter(ms);

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