This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets-examples.git


The following commit(s) were added to refs/heads/main by this push:
     new 496769e  Updated example
496769e is described below

commit 496769efbd9b02fc7cabc50d55e3899139495fef
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Sun Dec 3 19:33:42 2023 +0100

    Updated example
---
 jbang/json-transform/README.adoc | 12 ++++++++++++
 jbang/json-transform/sample.json | 13 +++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/jbang/json-transform/README.adoc b/jbang/json-transform/README.adoc
index ee111a7..04c3399 100644
--- a/jbang/json-transform/README.adoc
+++ b/jbang/json-transform/README.adoc
@@ -40,6 +40,18 @@ Or run with JBang using the longer command line (without 
installing camel as app
 $ jbang camel@apache/camel run beer-jq.yaml
 ----
 
+=== Live updates of message transformation
+
+You can do live changes to the template in the beer-jo.yaml file and see the 
output in real-time with Camel JBang by running:
+
+[source,bash]
+----
+$ camel transform message --body=file:sample.json --source=beer-jq.yaml 
--pretty --watch
+----
+
+You can then edit the source file `beer-jq.yaml` file, and save the file, and 
watch the terminal for updated result.
+
+
 
 === Help and contributions
 
diff --git a/jbang/json-transform/sample.json b/jbang/json-transform/sample.json
new file mode 100644
index 0000000..3c8fecb
--- /dev/null
+++ b/jbang/json-transform/sample.json
@@ -0,0 +1,13 @@
+{
+  "id": 4209,
+  "uid": "2b9afe24-0fd5-4623-a8d1-02c6a4d110a3",
+  "brand": "Coors lite",
+  "name": "Chocolate St",
+  "style": "Bock",
+  "hop": "Comet",
+  "yeast": "5335 - Lactobacillus",
+  "malts": "Wheat mal",
+  "ibu": "62 IBU",
+  "alcohol": "9.6%",
+  "blg": "18.9°Blg"
+}

Reply via email to