System.Json.JsonPrimitive.GetFormattedString C# (CSharp) 메소드

GetFormattedString() 개인적인 메소드

private GetFormattedString ( ) : string
리턴 string
        internal string GetFormattedString()
        {
            switch (JsonType)
            {
                case JsonType.String:
                    if (value is string || value == null)
                        return (string)value;
                    throw new NotImplementedException("GetFormattedString from value type " + value.GetType());
                case JsonType.Number:
                    return ((IFormattable)value).ToString("G", NumberFormatInfo.InvariantInfo);
                default:
                    throw new InvalidOperationException();
            }
        }
    }