You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by richardgroote <ri...@gmail.com> on 2015/01/30 13:43:03 UTC

XmlJsonDataFormat data format definition cannot set typeHints

Good day,

When using the dataformats with the help of
org.apache.camel.model.dataformat.XmlJsonDataFormat than the typeHints
cannot be set.

I think there is a bug in method configureDataFormat. The second parameter
in the method call
setProperty(camelContext, typeHints, TYPE_HINTS, typeHints);  should be
dataFormat.




<dataFormats>
    <xmljson id="xmljson" typeHints="YES"/>
</dataFormats>


	<bean id="xml2json"
class="org.apache.camel.dataformat.xmljson.XmlJsonDataFormat">
		<property name="typeHints" value="YES"/>
		<property name="expandableProperties" value="objects"/>
		<property name="forceTopLevelObject" value="true"/>
		<property name="trimSpaces" value="true"/>
		<property name="rootName" value="request"/>
		<property name="skipNamespaces" value="true"/>
		<property name="removeNamespacePrefixes" value="true"/>
	</bean>


Kind regards,

Richard



--
View this message in context: http://camel.465427.n5.nabble.com/XmlJsonDataFormat-data-format-definition-cannot-set-typeHints-tp5762258.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: XmlJsonDataFormat data format definition cannot set typeHints

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yes that was a bug. Fixed by CAMEL-8217

On Fri, Jan 30, 2015 at 1:43 PM, richardgroote <ri...@gmail.com> wrote:
>
> Good day,
>
> When using the dataformats with the help of
> org.apache.camel.model.dataformat.XmlJsonDataFormat than the typeHints
> cannot be set.
>
> I think there is a bug in method configureDataFormat. The second parameter
> in the method call
> setProperty(camelContext, typeHints, TYPE_HINTS, typeHints);  should be
> dataFormat.
>
>
>
>
> <dataFormats>
>     <xmljson id="xmljson" typeHints="YES"/>
> </dataFormats>
>
>
>         <bean id="xml2json"
> class="org.apache.camel.dataformat.xmljson.XmlJsonDataFormat">
>                 <property name="typeHints" value="YES"/>
>                 <property name="expandableProperties" value="objects"/>
>                 <property name="forceTopLevelObject" value="true"/>
>                 <property name="trimSpaces" value="true"/>
>                 <property name="rootName" value="request"/>
>                 <property name="skipNamespaces" value="true"/>
>                 <property name="removeNamespacePrefixes" value="true"/>
>         </bean>
>
>
> Kind regards,
>
> Richard
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/XmlJsonDataFormat-data-format-definition-cannot-set-typeHints-tp5762258.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/