File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ public static string ReplaceAndRemoveSlashes(this string body)
131131 ProcessBody ( jsonToken ) ;
132132
133133 // Return cleaned JSON string
134- return JsonConvert . SerializeObject ( jsonToken , Formatting . None , new PreserveStringConverter ( ) ) ;
134+ return JsonConvert . SerializeObject ( jsonToken , Formatting . None ) ;
135135 }
136136 catch ( Newtonsoft . Json . JsonException )
137137 {
@@ -154,7 +154,8 @@ private static void ProcessBody(JToken token)
154154 string stringValue = value . ToString ( ) ;
155155 try
156156 {
157- property . Value = stringValue ; // Replace with unescaped JSON object
157+ JToken parsedValue = JToken . Parse ( stringValue ) ;
158+ property . Value = parsedValue ; // Replace with unescaped JSON object
158159 ProcessBody ( stringValue ) ; // Recursively process
159160 }
160161 catch ( Newtonsoft . Json . JsonException )
@@ -180,7 +181,8 @@ private static void ProcessBody(JToken token)
180181 string stringValue = value . ToString ( ) ;
181182 try
182183 {
183- jsonArray [ i ] = stringValue ; // Replace with unescaped JSON object
184+ JToken parsedValue = JToken . Parse ( stringValue ) ;
185+ jsonArray [ i ] = parsedValue ; // Replace with unescaped JSON object
184186 ProcessBody ( stringValue ) ; // Recursively process
185187 }
186188 catch ( Newtonsoft . Json . JsonException )
You can’t perform that action at this time.
0 commit comments