【发布时间】:2017-03-15 08:58:51
【问题描述】:
我用类过滤json类名的路线是
<route>
<from uri="file:D:/inputFolder/jsonpath"/>
<choice>
<when>
<jsonpath>$..com.mycompany.app10.Person</jsonpath>
<to uri="file:D:/inputFolder/jsonpath/output"/>
</when>
</choice>
</route>
我的示例输入是
{"com.mycompany.app10.Person":{"firstName":"Gregory","surname":"Smith","type":"FAMILY"}}
在我的路线中,如果我在 json 路径中使用“$..Person”并且我的输入是
{"Person":{"firstName":"Gregory","surname":"Smith","type":"FAMILY"}}
一切正常!!
但是带有路径的类名不起作用,是否有任何解决方法。
【问题讨论】:
标签: json apache-camel jsonpath