浏览代码

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;
                   }