Commit cfab51d429b7f4017b9086de1d0c97ea0a8fb4a1
1 parent
5699fe47
Commit changes for Invalid json output raised .
Showing
1 changed file
with
10 additions
and
10 deletions
350-UTILITIES/Parser/XMLtoJSON_utility/XMLtoJSON_utility/Default.aspx.cs
... | ... | @@ -162,16 +162,16 @@ namespace XMLtoJSON_utility |
162 | 162 | StringBuilder sbOut = new StringBuilder(sIn.Length); |
163 | 163 | foreach (char ch in sIn) |
164 | 164 | { |
165 | - //if (Char.IsControl(ch) || ch == '\'') | |
166 | - //{ | |
167 | - // int ich = (int)ch; | |
168 | - // sbOut.Append(@"\u" + ich.ToString("x4")); | |
169 | - // continue; | |
170 | - //} | |
171 | - //else if (ch == '\"' || ch == '\\' || ch == '/') | |
172 | - //{ | |
173 | - // sbOut.Append('\\'); | |
174 | - //} | |
165 | + if (Char.IsControl(ch) || ch == '\'') | |
166 | + { | |
167 | + int ich = (int)ch; | |
168 | + sbOut.Append(@"\u" + ich.ToString("x4")); | |
169 | + continue; | |
170 | + } | |
171 | + else if (ch == '\"' || ch == '\\' || ch == '/') | |
172 | + { | |
173 | + sbOut.Append('\\'); | |
174 | + } | |
175 | 175 | sbOut.Append(ch); |
176 | 176 | } |
177 | 177 | return sbOut.ToString(); | ... | ... |