Exemplo n.º 1
0
        protected override JsonValue _OnGetJsonValue()
        {
            JsonDouble rtn = new JsonDouble();

            rtn.init(_data);
            return(rtn);
        }
Exemplo n.º 2
0
        protected override JsonValue _OnGetJsonValue()
        {
            JsonDouble rtn = new JsonDouble();

            if (_isEmpty)
            {
                rtn.init(0);
            }
            else
            {
                rtn.init(_data);
            }
            return(rtn);
        }
Exemplo n.º 3
0
        protected override JsonValue _OnGetJsonValue()
        {
            switch (_type)
            {
            case NumberType.Integer:
                JsonInteger iRtn = new JsonInteger();
                iRtn.init(_iData);
                return(iRtn);

            case NumberType.Double:
                JsonDouble rtn = new JsonDouble();
                rtn.init(_data);
                return(rtn);
            }
            Debug.Exception("NumberVal类型错误");
            return(new JsonNil());
        }