public async Task WriteTokenWithParentAsync()
        {
            JObject o = new JObject
            {
                ["prop1"] = new JArray(1),
                ["prop2"] = 1
            };

            JTokenWriter writer = new JTokenWriter();

            await writer.WriteStartArrayAsync();

            await writer.WriteTokenAsync(o.CreateReader());

            Assert.AreEqual(WriteState.Array, writer.WriteState);

            await writer.WriteEndArrayAsync();

            Console.WriteLine(writer.Token.ToString());

            StringAssert.AreEqual(@"[
  {
    ""prop1"": [
      1
    ],
    ""prop2"": 1
  }
]", writer.Token.ToString());
        }
        public async Task WriteValueTokenWithParentAsync()
        {
            JValue v = new JValue(1);

            JTokenWriter writer = new JTokenWriter();

            await writer.WriteStartArrayAsync();

            await writer.WriteTokenAsync(v.CreateReader());

            Assert.AreEqual(WriteState.Array, writer.WriteState);

            await writer.WriteEndArrayAsync();

            StringAssert.AreEqual(@"[
  1
]", writer.Token.ToString());
        }
        public async Task WriteTokenWithPropertyParentAsync()
        {
            JValue v = new JValue(1);

            JTokenWriter writer = new JTokenWriter();

            await writer.WriteStartObjectAsync();

            await writer.WritePropertyNameAsync("Prop1");

            await writer.WriteTokenAsync(v.CreateReader());

            Assert.AreEqual(WriteState.Object, writer.WriteState);

            await writer.WriteEndObjectAsync();

            StringAssert.AreEqual(@"{
  ""Prop1"": 1
}", writer.Token.ToString());
        }
        public async Task WriteEmptyTokenAsync()
        {
            JObject    o      = new JObject();
            JsonReader reader = o.CreateReader();

            while (reader.Read())
            {
            }

            JTokenWriter writer = new JTokenWriter();

            await writer.WriteStartArrayAsync();

            await writer.WriteTokenAsync(reader);

            Assert.AreEqual(WriteState.Array, writer.WriteState);

            await writer.WriteEndArrayAsync();

            StringAssert.AreEqual(@"[]", writer.Token.ToString());
        }