Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-9605

Allow camel-gson to unmarshall more type by default

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.17.0
    • Component/s: camel-gson
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      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:

      <unmarshal>
          <json library="Gson" unmarshalTypeName="java.lang.Object"/>
      </unmarshal>
      

      You should be able to unmarshall any type of json document with the default setting, eg:

      <unmarshal>
          <json library="Gson"/>
      </unmarshal>
      

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              xfournet Xavier Fournet
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: