From c7ae697b4da82f8efccc95b27142387b6204da47 Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wdconinc@gmail.com>
Date: Mon, 5 Feb 2024 14:46:32 -0600
Subject: [PATCH] doc: add json example

---
 DDG4/python/DDSim/Helper/Action.py | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/DDG4/python/DDSim/Helper/Action.py b/DDG4/python/DDSim/Helper/Action.py
index 70ddd95a8..0070cd2ee 100644
--- a/DDG4/python/DDSim/Helper/Action.py
+++ b/DDG4/python/DDSim/Helper/Action.py
@@ -44,7 +44,18 @@ class Action(ConfigHelper):
   # multiple actions by list of dict of name and parameter dict:
   >>> SIM.action.stack = [ { "name": "Geant4TestStackAction", "parameter": {"Property_int": 10} } ]
 
-On the command line, these can be specified as JSON strings.
+On the command line or in python, these actions can be specified as JSON strings:
+  $ ddsim --action.stack '{ "name": "Geant4TestStackAction", "parameter": { "Property_int": 10 } }'
+or
+  >>> SIM.action.stack = '''
+  {
+    "name": "Geant4TestStackAction",
+    "parameter": {
+      "Property_int": 10,
+      "Property_double": "1.0*mm"
+    }
+  }
+  '''
 
   """
 
-- 
GitLab