This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Text; | |
| public static class JsonFormatter | |
| { | |
| private const string Indent = " "; | |
| public static string PrettyPrint(string input) | |
| { | |
| var output = new StringBuilder(input.Length * 2); | |
| char? quote = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class StringTagExt | |
| { | |
| public static string AddBoldTag(this string text) | |
| { | |
| return text.AddTag("b"); | |
| } | |
| public static string AddItalicTag(this string text) | |
| { | |
| return text.AddTag("i"); |