Ejemplo n.º 1
0
        public override string ToString()
        {
            var sb    = new StringBuilder();
            var items = _Items;
            var count = _Count;

            if (1000 < count)
            {
                count = 1000;
            }
            sb.Append("[ ");
            for (int i = 0; i < count; i++)
            {
                if (i != 0)
                {
                    sb.AppendLine(",");
                }
                sb.Append(Jsonable.ToString(items[i]));
            }
            if (count < _Count)
            {
                sb.AppendLine(",");
                sb.AppendLine("{ \"AndMore\": \"...\" }");
            }
            sb.Append(" ]");
            return(sb.ToString());
        }
Ejemplo n.º 2
0
        public string ToJsonString()
        {
            var sb    = new StringBuilder();
            var items = _Items;
            var count = _Count;

            sb.Append("[ ");
            for (int i = 0; i < count; i++)
            {
                if (i != 0)
                {
                    sb.AppendLine(",");
                }
                sb.Append(Jsonable.ToString(items[i]));
            }
            sb.Append(" ]");
            return(sb.ToString());
        }