All Downloads are FREE. Search and download functionalities are using the official Maven repository.

routes.jackson-routes.xml Maven / Gradle / Ivy

The newest version!
<?xml version="1.0" encoding="UTF-8"?>
<!--

    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://camel.apache.org/schema/spring"
        xsi:schemaLocation="
            http://camel.apache.org/schema/spring
            http://camel.apache.org/schema/spring/camel-spring.xsd">

    <route>
        <from uri="direct:Jackson-type-as-attribute"/>
        <unmarshal>
            <json library="Jackson" unmarshalType="org.apache.camel.quarkus.component.dataformats.json.jackson.model.AnotherObject"/>
        </unmarshal>
    </route>

    <route>
        <from uri="direct:Jackson-type-as-header"/>
        <setHeader name="CamelJacksonUnmarshalType">
            <constant>org.apache.camel.quarkus.component.dataformats.json.model.AnotherObject</constant>
        </setHeader>
        <unmarshal>
            <json library="Jackson" allowUnmarshallType="true"/>
        </unmarshal>
    </route>

    <route>
        <from uri="direct:jacksonxml-unmarshal-spring-list-backPojo"/>
        <unmarshal><jacksonXml useList="true" unmarshalType="org.apache.camel.quarkus.component.dataformats.json.jackson.model.TestPojo"/></unmarshal>
        <to uri="mock:jacksonxml-unmarshal-spring-list-reversePojo"/>
    </route>

    <route>
      <from uri="direct:jacksonxml-marshal-spring-enablefeature"/>
      <marshal>
        <jacksonXml unmarshalType="org.apache.camel.quarkus.component.dataformats.json.jackson.model.TestPojo"
            enableFeatures="WRAP_ROOT_VALUE"/>
      </marshal>
    </route>

    <route>
      <from uri="direct:jacksonxml-xml-in"/>
      <marshal><jacksonXml/></marshal>
    </route>

    <route>
      <from uri="direct:jacksonxml-xml-inPretty"/>
      <marshal><jacksonXml prettyPrint="true"/></marshal>
    </route>

    <route>
      <from uri="direct:jacksonxml-xml-back"/>
      <unmarshal><jacksonXml/></unmarshal>
      <to uri="mock:jacksonxml-xml-reverse"/>
    </route>

    <route>
      <from uri="direct:jacksonxml-xml-inPojo"/>
      <marshal><jacksonXml unmarshalType="org.apache.camel.quarkus.component.dataformats.json.jackson.model.TestPojo"/></marshal>
    </route>

    <route>
      <from uri="direct:jacksonxml-xml-backPojo"/>
      <unmarshal><jacksonXml unmarshalType="org.apache.camel.quarkus.component.dataformats.json.jackson.model.TestPojo"/></unmarshal>
      <to uri="mock:jacksonxml-xml-reversePojo"/>
    </route>

    <route>
      <from uri="direct:jacksonxml-xml-inAgeView"/>
      <marshal><jacksonXml unmarshalType="org.apache.camel.quarkus.component.dataformats.json.jackson.model.TestPojoView" jsonView="org.apache.camel.quarkus.component.dataformats.json.jackson.model.Views$Age"/></marshal>
    </route>

    <route>
      <from uri="direct:jacksonxml-xml-backAgeView"/>
      <unmarshal><jacksonXml unmarshalType="org.apache.camel.quarkus.component.dataformats.json.jackson.model.TestPojoView" jsonView="org.apache.camel.quarkus.component.dataformats.json.jackson.model.Views$Age"/></unmarshal>
      <to uri="mock:jacksonxml-xml-reverseAgeView"/>
    </route>

    <route>
      <from uri="direct:jackson-xml-unmarshal-list-backPojo"/>
      <unmarshal><json library="Jackson" useList="true" unmarshalType="org.apache.camel.quarkus.component.dataformats.json.jackson.model.TestPojo"/></unmarshal>
      <to uri="mock:jackson-xml-unmarshal-list-reversePojo"/>
    </route>

    <route>
      <from uri="direct:jackson-enablefeature-in"/>
      <marshal><json library="Jackson" unmarshalType="org.apache.camel.quarkus.component.dataformats.json.jackson.model.TestPojo"
            enableFeatures="WRAP_ROOT_VALUE"/></marshal>
    </route>
</routes>






© 2015 - 2024 Weber Informatics LLC | Privacy Policy