public JDom Add() { JDom temp = new JDom(); Add(temp); return(temp); }
public JItem this[string name] { get { if (_Dom == null) _Dom = new JDom(); return _Dom[name]; } }
public JItem this[string name] { get { if (_Dom == null) { _Dom = new JDom(); } return(_Dom[name]); } }
public static JDom ToJson(object val, Type type) { JDom dom = new JDom(); foreach (PropertyInfo p in type.GetProperties()) { if (p.CanRead && p.Name != "Item") { dom[p.Name].Val(p.GetValue(val, null)); } } return(dom); }
public JItem Add(JDom obj) { if (_DomList == null) { _DomList = new List <JDom>(); } _DomList.Add(obj); _Dom = obj; AsArray(); return(this); }
public static JDom ToJson(object val, Type type) { JDom dom = new JDom(); foreach (PropertyInfo p in type.GetProperties()) { if (p.CanRead && p.Name != "Item") dom[p.Name].Val(p.GetValue(val, null)); } return dom; }
public void Val(JDom obj) { _Dom = obj; }
public void Val(IEnumerable valList) { JItem temp = JConvert.ToJson(valList); if (temp._DomList != null) { _DomList = temp._DomList; _Dom = _DomList[_DomList.Count - 1]; } else if (temp._ValList != null) _ValList = temp._ValList; }
public JDom Add() { JDom temp = new JDom(); Add(temp); return temp; }
public JItem Add(JDom obj) { if (_DomList == null) _DomList = new List<JDom>(); _DomList.Add(obj); _Dom = obj; AsArray(); return this; }