Esempio n. 1
0
        //[Benchmark]
        public void Utf8JsonWriteStringRaw()
        {
            global::Utf8Json.JsonWriter json = new global::Utf8Json.JsonWriter();

            byte[] first = global::Utf8Json.JsonWriter.GetEncodedPropertyName("fir\nst");
            byte[] john  = global::Utf8Json.JsonWriter.GetEncodedPropertyName("Joh\nn");

            json.WriteBeginObject();
            for (int i = 0; i < 100; i++)
            {
                json.WriteRaw(first);
                json.WriteNameSeparator();
                json.WriteRaw(john);
            }
            json.WriteEndObject();
        }