Пример #1
0
 public void Add(string attribute, int key)
 {
     if (builder == null)
     {
         builder = new VPackBuilder();
         builder.Add(SliceType.Object);
     }
     builder.AddCompactInt(attribute, key);
 }
Пример #2
0
 /// <summary>
 /// Writes the beginning of a JSON object.
 /// </summary>
 public override void WriteStartObject()
 {
     base.WriteStartObject();
     if (attributeName == null)
     {
         builder.Add(SliceType.Object);
     }
     else
     {
         builder.Add(attributeName, SliceType.Object);
         attributeName = null;
     }
 }