소스 검색

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 6 년 전
부모
커밋
242c599537
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  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;
                   }