Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="JValue"/> class from another <see cref="JValue"/> object.
 /// </summary>
 /// <param name="other">A <see cref="JValue"/> object to copy from.</param>
 public JValue(JValue other)
   : this(other.Value, other.Type)
 {
 }
Пример #2
0
    private void AddValue(JValue value, JsonToken token)
    {
      if (_parent != null)
      {
        _parent.Add(value);

        if (_parent.Type == JsonTokenType.Property)
          _parent = _parent.Parent;
      }
      else
      {
        _value = value;
      }
    }