Ejemplo n.º 1
0
        internal override void c(StringBuilder ky, int kz, int la, JSONTextMode lb)
        {
            ky.Append('{');
            bool flag = true;

            if (this.m_c)
            {
                lb = JSONTextMode.Compact;
            }
            foreach (KeyValuePair <string, JSONNode> item in d)
            {
                if (!flag)
                {
                    ky.Append(',');
                }
                flag = false;
                if (lb == JSONTextMode.Indent)
                {
                    ky.AppendLine();
                }
                if (lb == JSONTextMode.Indent)
                {
                    ky.Append(' ', kz + la);
                }
                ky.Append('"').Append(JSONNode.a(item.Key)).Append('"');
                if (lb == JSONTextMode.Compact)
                {
                    ky.Append(':');
                }
                else
                {
                    ky.Append(" : ");
                }
                item.Value.c(ky, kz + la, la, lb);
            }
            if (lb == JSONTextMode.Indent)
            {
                ky.AppendLine().Append(' ', kz);
            }
            ky.Append('}');
        }
Ejemplo n.º 2
0
 internal override void c(StringBuilder lc, int ld, int le, JSONTextMode lf)
 {
     lc.Append('"').Append(JSONNode.a(e)).Append('"');
 }