鉴于此JSON:
{
"Key with, coma": ["I have a comma", "Does't work"],
"Key without coma": ["I don't have a coma", "It works"]
}
以下引发错误:
$['Key with, comma'][*]
没问题:
$['Key without comma'][*]
有没有办法逃脱逗号?
我在Lingo4g索引项目描述符中使用Github。
如果您使用此工具查看它似乎有效:jsonpath.curiousconcept.com
但如果您使用此工具则不会:here
表达式通过JSON值传递给Lingo4g基于Java的集群工具:
"fieldMapping": {
"Key with, comma": "$['Key with, comma'][*]",
"Key without comma": "$['Key without comma'][*]"
}