51Testing软件测试论坛

标题: Jmeter-Json串中含转义字符,使用JSON Extractor提取失败 [打印本页]

作者: 轻歌越野    时间: 2019-1-2 15:20
标题: Jmeter-Json串中含转义字符,使用JSON Extractor提取失败
响应如下:

{"code":0,"msg":"SUCCESS","data":[{"deviceid":"29083","inverterserial":"","commcardserial":"","pcsmodel":"Mario 6.0   ","removed":0,"modified":"2018-07-04T09:08:30.161Z","created":"2018-07-04T09:08:30.161Z","config":"{\"deviceID\":\"29083\",\"cmd_id\":\"Cov7Us2WVe\",\"timestamp\":\"1545639511\",\"inverterSerial\":\"             \",\"commcardSerial\":\"\",\"commcardVersion\":\"1.0.0\",\"network\":{\"type\":\"ethernet\",\"macAddress\":\"00:30:AB:FF8:0E\",\"ipAddress\":\"192.168.3.104\"},\"swLastUpdatedTime\":\"1542008395\",\"pcsModel\":\"Mario 6.0   \",\"inverterHwVer\":\"00.02\",\"inverterSwVer\":\"\",\"time\":{\"timeZone\":\"8\",\"utcTimeCmd\":\"1545369829\"},\"batteryInfo\":[{\"batteryModel\":\"\",\"batterySerial\":\"0\",\"batteryCapacity\":\"9800\"},{\"batteryModel\":\"\",\"batterySerial\":\"0\",\"batteryCapacity\":\"0\"}],\"pcsOutLimit\":\"6000\",\"pcsOpMode\":\"0\",\"TOU\":{\"chargeStart\":\"19\",\"chargeEnd\":\"30\",\"chargePower\":\"40\",\"dischargeStart\":\"50\",\"dischargeEnd\":\"60\",\"dischargePower\":\"300\"},\"backupSOC\":\"30\",\"gridSelector\":{\"gridType\":\"17\",\"utility\":\"3\"},\"gridStatus\":\"0\",\"rule21\":{\"synchronization\":{\"syncTime\":\"500.00\",\"vLow\":\"89.0\",\"vHigh\":\"105.0\",\"freqLow\":\"59.66\",\"freqHigh\":\"61.00\"},\"ramp\":{\"softStartRamp\":\"888.0\",\"normalRamp\":\"888.0\"},\"lhvrt\":{\"ov2Voltage\":\"120\",\"ov2Time\":\"0.16\",\"ov1Voltabe\":\"115\",\"ov1Time\":\"12.00\",\"uv1Voltage\":\"88\",\"uv1Time\":\"50.00\",\"uv2Voltage\":\"80\",\"uv2Time\":\"20.00\",\"uv3Voltage\":\"50\",\"uv3Time\":\"0.16\"},\"lhfrt\":{\"of2Freq\":\"64.50\",\"of2Time\":\"2.00\",\"of1Freq\":\"63.00\",\"of1Time\":\"21.00\",\"uf1Freq\":\"58.88\",\"uf1Time\":\"21.00\",\"uf2Freq\":\"56.00\",\"uf2Time\":\"22.00\"},\"powerPriority\":\"0\",\"activePowerControl\":{\"mode\":\"1\",\"fixP\":{\"maxPower\":\"99.0\"},\"v1\":\"105.0\",\"p1\":\"100.0\",\"v2\":\"109.0\",\"p2\":\"0.0\",\"voltWatt\":{\"timeConst\":\"100\"},\"freqWatt\":{\"hyst\":\"1\",\"startFreq\":\"2.00\",\"endFreq\":\"3.00\",\"gradient\":\"600.0\",\"timeConst\":\"80\"}},\"reactivePowerControl\":{\"mode\":\"1\",\"fixPf\":{\"cosPhi\":\"-0.950\"},\"voltVar\":{\"v1\":\"110.0\",\"q1\":\"100.0\",\"v2\":\"110.0\",\"q2\":\"100.0\",\"v3\":\"110.0\",\"q3\":\"100.0\",\"v4\":\"100.0\",\"q4\":\"-44.0\",\"timeConst\":\"100\"}}}}","online":1}]}


使用JSON Extractor提取失败:$.data[0].config.cmd_id

求解


作者: Miss_love    时间: 2020-12-28 09:24
$.. cmd_id




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2