Repository: camel
Updated Branches:
  refs/heads/master c8ca9f5b2 -> e68960d54


Added String dataformat docs to Gitbook


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e68960d5
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e68960d5
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e68960d5

Branch: refs/heads/master
Commit: e68960d54604b374f1cb84b842344f42a0198908
Parents: c8ca9f5
Author: Andrea Cosentino <anco...@gmail.com>
Authored: Wed Aug 31 08:40:33 2016 +0200
Committer: Andrea Cosentino <anco...@gmail.com>
Committed: Wed Aug 31 08:40:58 2016 +0200

----------------------------------------------------------------------
 camel-core/src/main/docs/string-dataformat.adoc | 56 ++++++++++++++++++++
 1 file changed, 56 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e68960d5/camel-core/src/main/docs/string-dataformat.adoc
----------------------------------------------------------------------
diff --git a/camel-core/src/main/docs/string-dataformat.adoc 
b/camel-core/src/main/docs/string-dataformat.adoc
new file mode 100644
index 0000000..2ccf0c8
--- /dev/null
+++ b/camel-core/src/main/docs/string-dataformat.adoc
@@ -0,0 +1,56 @@
+[[String-Dataformat]]
+String Dataformat
+~~~~~~~~~~~~~~~~~
+
+The String link:data-format.html[Data Format] is a textual based format
+that supports encoding.
+
+[[String-Options]]
+Options
+^^^^^^^
+
+// dataformat options: START
+The String Encoding dataformat supports 1 options which are listed below.
+
+
+
+{% raw %}
+[width="100%",cols="2s,1m,1m,6",options="header"]
+|=======================================================================
+| Name | Default | Java Type | Description
+| charset |  | String | Sets an encoding to use. Will by default use the JVM 
platform default charset.
+|=======================================================================
+{% endraw %}
+// dataformat options: END
+
+[[String-Marshal]]
+Marshal
+^^^^^^^
+
+In this example we marshal the file content to String object in UTF-8
+encoding.
+
+[source,java]
+----------------------------------------------------------------------
+from("file://data.csv").marshal().string("UTF-8").to("jms://myqueue");
+----------------------------------------------------------------------
+
+[[String-Unmarshal]]
+Unmarshal
+^^^^^^^^^
+
+In this example we unmarshal the payload from the JMS queue to a String
+object using UTF-8 encoding, before its processed by the newOrder
+processor.
+
+[source,java]
+-----------------------------------------------------------------------------
+from("jms://queue/order").unmarshal().string("UTF-8").processRef("newOrder");
+-----------------------------------------------------------------------------
+
+[[String-Dependencies]]
+Dependencies
+^^^^^^^^^^^^
+
+This data format is provided in *camel-core* so no additional
+dependencies is needed.

Reply via email to