Package org.apache.camel.model.dataformat

Examples of org.apache.camel.model.dataformat.JsonDataFormat


   
    protected DataFormatDefinition createDataformatDefinition(String format) {
        if (format.equals("xstream")) {
            return new XStreamDataFormat();
        } else {
            return new JsonDataFormat();
        }
    }
View Full Code Here


public class CamelJacksonTest extends AbstractFeatureTest {

    public static final String COMPONENT = extractName(CamelJacksonTest.class);

    protected DataFormatDefinition createDataformatDefinition(String format) {
        return new JsonDataFormat(JsonLibrary.Jackson);
    }
View Full Code Here

    /**
     * Uses the JSON data format using the XStream json library
     */
    public T json() {
        return dataFormat(new JsonDataFormat());
    }
View Full Code Here

     * Uses the JSON data format
     *
     * @param library the json library to use
     */
    public T json(JsonLibrary library) {
        return dataFormat(new JsonDataFormat(library));
    }
View Full Code Here

     *
     * @param type          the json type to use
     * @param unmarshalType unmarshal type for json jackson type
     */
    public T json(JsonLibrary type, Class<?> unmarshalType) {
        JsonDataFormat json = new JsonDataFormat(type);
        json.setUnmarshalType(unmarshalType);
        return dataFormat(json);
    }
View Full Code Here

   
    protected DataFormatDefinition createDataformatDefinition(String format) {
        if (format.equals("xstream")) {
            return new XStreamDataFormat();
        } else {
            return new JsonDataFormat();
        }
    }
View Full Code Here

public class CamelGsonTest extends AbstractFeatureTest {

    public static final String COMPONENT = extractName(CamelGsonTest.class);

    protected DataFormatDefinition createDataformatDefinition(String format) {
        JsonDataFormat answer = new JsonDataFormat();
        answer.setLibrary(JsonLibrary.Gson);
        return answer;
    }
View Full Code Here

   
    /**
     * Uses the JSON data format using the XStream json library
     */
    public T json() {
        return dataFormat(new JsonDataFormat());
    }
View Full Code Here

     * Uses the JSON data format
     *
     * @param library the json library to use
     */
    public T json(JsonLibrary library) {
        return dataFormat(new JsonDataFormat(library));
    }
View Full Code Here

     *
     * @param type the json type to use
     * @param unmarshalType unmarshal type for json jackson type
     */
    public T json(JsonLibrary type, Class<?> unmarshalType) {
        JsonDataFormat json = new JsonDataFormat(type);
        json.setUnmarshalType(unmarshalType);
        return dataFormat(json);
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.model.dataformat.JsonDataFormat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.