如果选择器有一个逗号","?如何声明表达式?

时间:2017-10-05 15:25:25

标签: java json jsonpath

鉴于此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'][*]"
      }

0 个答案:

没有答案