Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 029fe1c

Browse files
committed
collapse constants
1 parent 63c6734 commit 029fe1c

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

src/ServiceStack.Text/Json/JsonUtils.cs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@ public static class JsonUtils
1212

1313
public const char EscapeChar = '\\';
1414

15-
public const char EscapeTab = 't';
16-
public const char EscapeCarriageReturn = 'r';
17-
public const char EscapeLineFeedChar = 'n';
18-
public const char EscapeFormFeedChar = 'f';
19-
public const char EscapeBackspaceChar = 'b';
20-
2115
public const char QuoteChar = '"';
2216
public const string Null = "null";
2317
public const string True = "true";
@@ -33,11 +27,11 @@ public static class JsonUtils
3327
/// Micro-optimization keep pre-built char arrays saving a .ToCharArray() + function call (see .net implementation of .Write(string))
3428
/// </summary>
3529
private static readonly char[] EscapedBackslash = { EscapeChar, EscapeChar };
36-
private static readonly char[] EscapedTab = { EscapeChar, EscapeTab };
37-
private static readonly char[] EscapedCarriageReturn = { EscapeChar, EscapeCarriageReturn };
38-
private static readonly char[] EscapedLineFeed = { EscapeChar, EscapeLineFeedChar };
39-
private static readonly char[] EscapedFormFeed = { EscapeChar, EscapeFormFeedChar };
40-
private static readonly char[] EscapedBackspace = { EscapeChar, EscapeBackspaceChar };
30+
private static readonly char[] EscapedTab = { EscapeChar, 't' };
31+
private static readonly char[] EscapedCarriageReturn = { EscapeChar, 'r' };
32+
private static readonly char[] EscapedLineFeed = { EscapeChar, 'n' };
33+
private static readonly char[] EscapedFormFeed = { EscapeChar, 'f' };
34+
private static readonly char[] EscapedBackspace = { EscapeChar, 'b' };
4135
private static readonly char[] EscapedQuote = { EscapeChar, QuoteChar };
4236

4337
public static readonly char[] WhiteSpaceChars = { ' ', TabChar, CarriageReturnChar, LineFeedChar };

0 commit comments

Comments
 (0)