Camel方式:JSON到Object of Object

时间:2015-12-28 12:07:07

标签: json jackson apache-camel

需要将“[100,200]”之类的字符串反序列化为Integer数组,以便以后使用:

<to uri="class:java.awt.Robot?method=mouseMove&amp;multiParameterArray=true"/>

multiParameterArray = true 是一个关键。

<unmarshal ref="json"/>

<dataFormats>
    <json id="json" library="Jackson" allowJmsType="true"/>
</dataFormats>
卡住了。在受限制的环境中工作,无法创建执行这些东西的自定义bean。需要一些标准的驼峰方式。

更新1 似乎这个结构完全符合我的需要。但我最好使用<unmarshal/>而不是

<setBody>
  <constant>[100,200]</constant>
</setBody>
<setBody>
    <jsonpath>$.*</jsonpath>
</setBody>

0 个答案:

没有答案