我正在尝试使用 JSON 输入步骤处理以下内容:
{"address":[
{"AddressId":"1_1","Street":"A Street"},
{"AddressId":"1_101","Street":"Another Street"},
{"AddressId":"1_102","Street":"One more street", "Locality":"Buenos Aires"},
{"AddressId":"1_102","Locality":"New York"}
]}
然而,这似乎是不可能的:
Json Input.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) :
The data structure is not the same inside the resource!
We found 1 values for json path [$..Locality], which is different that the number retourned for path [$..Street] (3509 values).
We MUST have the same number of values for all paths.
该步骤提供了忽略缺失路径标志,但它仅在所有行都错过相同路径时才有效。在这种情况下,该步骤按预期运行,并用 null 填充缺失值。
这限制了这一步读取不均匀数据的能力,这确实是我的优先事项之一。
我的 step 字段定义如下:
我错过了什么吗?这是正确的行为吗?