/// <summary> /// Creates a pair from text. Text will be modified with the remaining text. /// </summary> public Pair(StringBuilder text) { name = new String(text).ToString(); Value.ConsumeWhiteSpaces(text); if (text[0] != ':') { throw new Exception("JSON Pair missing ':'!"); } text.Remove(0, 1); Value.ConsumeWhiteSpaces(text); value = Value.MakeValue(text); }
public Pair(XmlNode node) { name = node.Name; value = Value.MakeValue(node); }