Explorar o código

HPCC-20736 JSON Test request and response contain extra new lines

- Skip new lines in the original text during prettifying
- Skip blank spaces in the original text except the one following ':'

Signed-off-by: mayx <yanrui.ma@lexisnexisrisk.com>
mayx %!s(int64=6) %!d(string=hai) anos
pai
achega
242c599537
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      esp/xslt/wsecl3_jsontest.xsl

+ 6 - 0
esp/xslt/wsecl3_jsontest.xsl

@@ -170,6 +170,12 @@
                             }
                           }
                           break;
+                       case '\n':
+                          break;
+                       case ' ':
+                          if (i > 0 && jsonstring.charAt(i-1) == ':')
+                              pretty += ch;
+                          break;
                        default:
                           pretty += ch;
                   }