少年修仙传客户端基础资源
lwb
2021-01-26 f6ab248e23fb6485f4121294ff4167e8a15a47a3
Assets/Plugins/LitJson/JsonWriter.cs
@@ -39,7 +39,7 @@
    public class JsonWriter
    {
        #region Fields
        private static readonly NumberFormatInfo number_format;
        private static NumberFormatInfo number_format;
        private WriterContext        context;
        private Stack<WriterContext> ctx_stack;
@@ -50,7 +50,6 @@
        private StringBuilder        inst_string_builder;
        private bool                 pretty_print;
        private bool                 validate;
        private bool                 lower_case_properties;
        private TextWriter           writer;
        #endregion
@@ -76,11 +75,6 @@
        public bool Validate {
            get { return validate; }
            set { validate = value; }
        }
        public bool LowerCaseProperties {
            get { return lower_case_properties; }
            set { lower_case_properties = value; }
        }
        #endregion
@@ -172,7 +166,6 @@
            indent_value = 4;
            pretty_print = false;
            validate = true;
            lower_case_properties = false;
            ctx_stack = new Stack<WriterContext> ();
            context = new WriterContext ();
@@ -223,7 +216,7 @@
                writer.Write (',');
            if (pretty_print && ! context.ExpectingValue)
                writer.Write (Environment.NewLine);
                writer.Write ('\n');
        }
        private void PutString (string str)
@@ -372,7 +365,6 @@
            context.ExpectingValue = false;
        }
        [CLSCompliant(false)]
        public void Write (ulong number)
        {
            DoValidation (Condition.Value);
@@ -449,17 +441,14 @@
        {
            DoValidation (Condition.Property);
            PutNewline ();
            string propertyName = (property_name == null || !lower_case_properties)
                ? property_name
                : property_name.ToLowerInvariant();
            PutString (propertyName);
            PutString (property_name);
            if (pretty_print) {
                if (propertyName.Length > context.Padding)
                    context.Padding = propertyName.Length;
                if (property_name.Length > context.Padding)
                    context.Padding = property_name.Length;
                for (int i = context.Padding - propertyName.Length;
                for (int i = context.Padding - property_name.Length;
                     i >= 0; i--)
                    writer.Write (' ');