[ https://issues.apache.org/jira/browse/CAMEL-9605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15147653#comment-15147653 ]
ASF GitHub Bot commented on CAMEL-9605: --------------------------------------- GitHub user xfournet opened a pull request: https://github.com/apache/camel/pull/841 CAMEL-9605 update default unmarshall type to java.lang.Object instead… … of java.util.Map to be able to unmarshall any valid Json document with the default configuration of Gson umarshaller You can merge this pull request into a Git repository by running: $ git pull https://github.com/xfournet/camel CAMEL-9605 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/camel/pull/841.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #841 ---- commit 274f9b6ddb9fc9031aa0364a8519d55e7da5d731 Author: Xavier Fournet <xavier.four...@gmail.com> Date: 2016-02-15T18:02:36Z CAMEL-9605 update default unmarshall type to java.lang.Object instead of java.util.Map to be able to unmarshall any valid Json document with the default configuration of Gson umarshaller ---- > Allow camel-gson to unmarshall more type by default > --------------------------------------------------- > > Key: CAMEL-9605 > URL: https://issues.apache.org/jira/browse/CAMEL-9605 > Project: Camel > Issue Type: Improvement > Components: camel-gson > Reporter: Xavier Fournet > > By default camel json unmarshaller accept to read only json which are map (eg > the json document begin with "{" ). If you want to be able to umarshal more > json document like simple string or list you have to specify the > unmarshalTypeName which is not very convenient, eg: > {code:xml} > <unmarshal> > <json library="Gson" unmarshalTypeName="java.lang.Object"/> > </unmarshal> > {code} > You should be able to unmarshall any type of json document with the default > setting, eg: > {code:xml} > <unmarshal> > <json library="Gson"/> > </unmarshal> > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)