Exemplo n.º 1
0
 public new static JObject Parse(CharReader value)
 {
     return((JObject)JBase.Parse(value));
 }
Exemplo n.º 2
0
 public new static JArray Parse(CharReader value)
 {
     return((JArray)JBase.Parse(value));
 }
Exemplo n.º 3
0
 public new static JObject Parse(string value)
 {
     return((JObject)JBase.Parse(value));
 }
Exemplo n.º 4
0
        //private static void _SaveValue(ref JArray obj, string value, bool inStringValue)
        //{
        //    if (!inStringValue)
        //    {
        //        value = value.TrimEnd(); // helps with parsing
        //    }
        //    if (inStringValue)
        //    {
        //        // see if the string is a datetime format
        //        if (DateTime.TryParse(value, CultureInfo.InvariantCulture,
        //                              DateTimeStyles.RoundtripKind, out DateTime datetimeValue))
        //        {
        //            obj.Add(datetimeValue);
        //        }
        //        else
        //        {
        //            obj.Add(value);
        //        }
        //    }
        //    else if (value == "null")
        //    {
        //        obj.Add(null);
        //    }
        //    else if (value == "true")
        //    {
        //        obj.Add(true);
        //    }
        //    else if (value == "false")
        //    {
        //        obj.Add(false);
        //    }
        //    else if (int.TryParse(value, out int intValue))
        //    {
        //        obj.Add(intValue); // default to int for anything smaller
        //    }
        //    else if (long.TryParse(value, out long longValue))
        //    {
        //        obj.Add(longValue);
        //    }
        //    else if (decimal.TryParse(value, out decimal decimalValue))
        //    {
        //        obj.Add(decimalValue);
        //    }
        //    else if (double.TryParse(value, out double doubleValue))
        //    {
        //        obj.Add(doubleValue);
        //    }
        //    else // unknown or non-numeric value
        //    {
        //        throw new SystemException($"Invalid value = '{value}'");
        //    }
        //}

        public new static JArray Parse(string value)
        {
            return((JArray)JBase.Parse(value));
        }