ToJson() public static method

public static ToJson ( object val, Type type ) : JDom
val object
type System.Type
return JDom
Beispiel #1
0
        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;
            }
        }
Beispiel #2
0
        public JItem Add(object val)
        {
            string temp = JConvert.ToJson(val);

            if (temp == null)
            {
                Add(JConvert.ToJson(val, val.GetType()));
            }
            else
            {
                DoAdd(temp);
            }

            return(this);
        }
Beispiel #3
0
        public void Val(object val)
        {
            _Val = JConvert.ToJson(val);

            if (_Val == null)
            {
                if (val is IEnumerable)
                {
                    Val((IEnumerable)val);
                }
                else
                {
                    Val(JConvert.ToJson(val, val.GetType()));
                }
            }
        }
Beispiel #4
0
 public void Val(ulong val)
 {
     _Val = JConvert.ToJson(val);
 }
Beispiel #5
0
 public void Val(uint val)
 {
     _Val = JConvert.ToJson(val);
 }
Beispiel #6
0
 public void Val(short val)
 {
     _Val = JConvert.ToJson(val);
 }
Beispiel #7
0
 public void Val(sbyte val)
 {
     _Val = JConvert.ToJson(val);
 }
Beispiel #8
0
        public JItem Add(string val)
        {
            DoAdd(JConvert.ToJson(val));

            return(this);
        }
Beispiel #9
0
        public JItem Add(decimal val)
        {
            DoAdd(JConvert.ToJson(val));

            return(this);
        }
Beispiel #10
0
 public void Val(double val)
 {
     _Val = JConvert.ToJson(val);
 }
Beispiel #11
0
 public void Val(decimal val)
 {
     _Val = JConvert.ToJson(val);
 }
Beispiel #12
0
 public void Val(DateTime val)
 {
     _Val = JConvert.ToJson(val);
 }
Beispiel #13
0
 public void Val(char val)
 {
     _Val = JConvert.ToJson(val);
 }
Beispiel #14
0
 public void Val(bool val)
 {
     _Val = JConvert.ToJson(val);
 }
Beispiel #15
0
 public void Val(string val)
 {
     _Val = JConvert.ToJson(val);
 }
Beispiel #16
0
 public void Val(Enum val)
 {
     _Val = JConvert.ToJson(val);
 }
Beispiel #17
0
 public void Val(float val)
 {
     _Val = JConvert.ToJson(val);
 }
Beispiel #18
0
        public JItem Add(DateTime val)
        {
            DoAdd(JConvert.ToJson(val));

            return(this);
        }
Beispiel #19
0
 public void Val(Guid val)
 {
     _Val = JConvert.ToJson(val);
 }
Beispiel #20
0
        public JItem Add(Enum val)
        {
            DoAdd(JConvert.ToJson(val));

            return(this);
        }
Beispiel #21
0
        public JItem Add(ushort val)
        {
            DoAdd(JConvert.ToJson(val));

            return(this);
        }