用常规方法测量json响应的大小

问题描述 投票:0回答:1

我有一个动态的json响应,我想衡量列表的大小。你能帮忙吗?

enter image description here

json groovy soapui
1个回答
0
投票

我用json slurper做到了。

def json = context.expand('$ {XXXXX#Response#$ [\'resultInfo \'] [\'XXXXXXXXXXX \']}')json =新的groovy.json.JsonSlurper()。parseText(json)def count = json.search.size()

© www.soinside.com 2019 - 2024. All rights reserved.