From cfab51d429b7f4017b9086de1d0c97ea0a8fb4a1 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 1 Jun 2016 14:42:37 +0530 Subject: [PATCH] Commit changes for Invalid json output raised . --- 350-UTILITIES/Parser/XMLtoJSON_utility/XMLtoJSON_utility/Default.aspx.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/350-UTILITIES/Parser/XMLtoJSON_utility/XMLtoJSON_utility/Default.aspx.cs b/350-UTILITIES/Parser/XMLtoJSON_utility/XMLtoJSON_utility/Default.aspx.cs index 4cb3bc1..46e3ccf 100644 --- a/350-UTILITIES/Parser/XMLtoJSON_utility/XMLtoJSON_utility/Default.aspx.cs +++ b/350-UTILITIES/Parser/XMLtoJSON_utility/XMLtoJSON_utility/Default.aspx.cs @@ -162,16 +162,16 @@ namespace XMLtoJSON_utility StringBuilder sbOut = new StringBuilder(sIn.Length); foreach (char ch in sIn) { - //if (Char.IsControl(ch) || ch == '\'') - //{ - // int ich = (int)ch; - // sbOut.Append(@"\u" + ich.ToString("x4")); - // continue; - //} - //else if (ch == '\"' || ch == '\\' || ch == '/') - //{ - // sbOut.Append('\\'); - //} + if (Char.IsControl(ch) || ch == '\'') + { + int ich = (int)ch; + sbOut.Append(@"\u" + ich.ToString("x4")); + continue; + } + else if (ch == '\"' || ch == '\\' || ch == '/') + { + sbOut.Append('\\'); + } sbOut.Append(ch); } return sbOut.ToString(); -- libgit2 0.21.4