PrettyPrint() public static method

public static PrettyPrint ( string input ) : string
input string
return string
Ejemplo n.º 1
0
 public string Beautify(string input)
 {
     return(Formatter.PrettyPrint(input));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Create a human readable string from the json
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public static string Beautify(string input)
        {
            var i = new string(' ', JSON.Parameters.FormatterIndentSpaces);

            return(Formatter.PrettyPrint(input, i));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Create a human readable string from the json with specified indent spaces
        /// </summary>
        /// <param name="input"></param>
        /// <param name="spaces"></param>
        /// <returns></returns>
        public static string Beautify(string input, byte spaces)
        {
            var i = new string(' ', spaces);

            return(Formatter.PrettyPrint(input, i));
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Create a human readable string from the JSON.
 /// </summary>
 /// <param name="input">The JSON string to be beautified.</param>
 /// <param name="decodeUnicode">Indicates whether \uXXXX encoded Unicode notations should be converted into actual Unicode characters.</param>
 /// <returns>A pretty-printed JSON string.</returns>
 public static string Beautify(string input, bool decodeUnicode)
 {
     return(Formatter.PrettyPrint(input, decodeUnicode));
 }