0
我有时需要在价值观与空解析JSON这样的:JSONPath无法找到空键的值
{"someKey" : null}
,并验证someKey值为空,但似乎不可能:
所有其他jsonPath被转换成字符串像这样:
{"someKey" : 2}
.check(jsonPath("$.someKey").is("2")) //pass
但空:
{"someKey" : null}
.check(jsonPath("$.someKey").is("null"))
//jsonPath($.extMediaThumbnailId).find(0).is(null), but actually found nothing
.is(null)
检查返回空指针异常
也许这是一个错误有没有一种方法来检查JSON值为null与jsonPath?