title: Apache Camel - GSON formatter
body: <p>I would like to format my gson when the json object came via Apache-Camel context. In my application_context.xml related field is like this:</p>
  
  <pre><code> &lt;camel:camelContext&gt;
          &lt;camel:dataFormats&gt;
              &lt;camel:json  id="gson" library="Gson" unmarshalTypeName="com.pzt.blz.fraud.domain.Payment"  /&gt;
          &lt;/camel:dataFormats&gt;
          &lt;camel:route&gt;
              &lt;camel:from uri="rabbitmq::blz.service.component.fraud?autodelete=false&amp;amp;durable=true"/&gt;
              &lt;camel:unmarshal ref="gson"&gt;&lt;/camel:unmarshal&gt;
                 &lt;camel:process ref="fraudProccessor"&gt;&lt;/camel:process&gt;
              &lt;camel:marshal ref="gson"&gt;&lt;/camel:marshal&gt;
              &lt;camel:inOnly uri="rabbitmq::blz.service.component.fraud-reply?autodelete=false&amp;amp;durable=true"/&gt;
          &lt;/camel:route&gt;
      &lt;/camel:camelContext&gt;
  </code></pre>
  
  <p>Camel:unmarshal and Camel:marshal parts are doing the json to object and vice versa thing.However I would like to add some properties on this file like:</p>
  
  <pre><code>public Gson createGson(){
      return new GsonBuilder().
              setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).
              setPrettyPrinting().
              serializeNulls().
              create();
  
  }
  </code></pre>
  
  <p>How can I setFieldNamingPolicy to LOWER_CASE_WITH_UNDERSCORES or LOWER_CASE_WITH_DASHES etc...</p>
  
  <p>Is there any chance to format this on Camel? and these changes should be done at my application_context.xml file.</p>
  
  <p>Appreciate for all replies...</p>