diff --git a/mpf/core/bcp/bcp_socket_client.py b/mpf/core/bcp/bcp_socket_client.py
index 19fb225f9..a0ba6c7f6 100644
--- a/mpf/core/bcp/bcp_socket_client.py
+++ b/mpf/core/bcp/bcp_socket_client.py
@@ -38,12 +38,12 @@ def decode_command_string(bcp_string):
     """
     bcp_command = urlsplit(bcp_string)
 
+    if bcp_command.query[0:5] == "json=":
+        kwargs = json.loads(bcp_command.query[5:])
+        return bcp_command.path.lower(), kwargs
+
     try:
         kwargs = parse_qs(bcp_command.query, keep_blank_values=True)
-        if 'json' in kwargs:
-            kwargs = json.loads(kwargs['json'][0])
-            return bcp_command.path.lower(), kwargs
-
     except AttributeError:
         kwargs = dict()
 

Crash in BCP when decoding a percent sign
```
ERROR : BCP Client : DECODE BCP ERROR. Message: monitored_event?json={"event_name": "logicblock_baby_bonus_hit", "event_type": null, "event_callback": null, "event_kwargs": {"count": 3}, "registered_handlers": [["<bound method ConfigPlayer.config_play_callback of ConfigPlayer.event_player/events>", 175, {"calling_context": "logicblock_baby_bonus_hit{count%10==5}", "mode": "<Mode.baby_bonus>", "settings": {"random_baby_mode": {"priority": 0}}}, "93fd9d4a-4fad-4e70-9853-6efa695eec8e", "<mpf.core.placeholder_manager.BoolTemplate object at 0x106a0f240>", null], ["<bound method ConfigPlayer.config_play_callback of ConfigPlayer.event_player/events>", 100, {"calling_context": "logicblock_baby_bonus_hit", "mode": "<Mode.base>", "settings": {"baby_bonus_start": {"priority": 0}}}, "be0a073d-7c5b-4f12-92e7-8429aa78d47d", null, null]]}
```
diff --git a/mpf/tests/test_BcpSocketClient.py b/mpf/tests/test_BcpSocketClient.py
index e1dd82c6e..fc2dc0bcf 100644
--- a/mpf/tests/test_BcpSocketClient.py
+++ b/mpf/tests/test_BcpSocketClient.py
@@ -8,6 +8,12 @@ from mpf.tests.loop import MockQueueSocket
 
 class TestBcpSocketClientEncoding(unittest.TestCase):
 
+    def test_roundtrip(self):
+        test_kwargs = {"registered_handlers": [{"calling_context": "logicblock_baby_bonus_hit{count%10==5}"}]}
+        encoded_cmd = encode_command_string("test", **test_kwargs)
+        decoded_cmd, decoded_cmd_kwargs = decode_command_string(encoded_cmd)
+        self.assertEqual(decoded_cmd_kwargs, test_kwargs)
+
     def test_decode_command_string(self):
         # test strings
         string_in = 'play?some_value=7&another_value=2'

pip install -e .
parse_log_pytest
pytest
virtualenv pytest
apt-get update apt-get install -y python3-venv
3.6
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
asciimatics==1.14.0
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work
certifi==2021.5.30
distlib==0.3.9
filelock==3.4.1
future==1.0.0
importlib-metadata==4.8.3
importlib-resources==5.4.0
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work
-e git+https://github.com/missionpinball/mpf.git@baa7bc960de8089abee0d917212c8f6093311f70#egg=mpf
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
Pillow==8.4.0
platformdirs==2.4.0
pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work
psutil==7.0.0
py @ file:///opt/conda/conda-bld/py_1644396412707/work
pyfiglet==0.8.post1
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
pyserial==3.5
pyserial-asyncio==0.6
pytest==6.2.4
ruamel.base==1.0.0
ruamel.yaml==0.10.23
terminaltables==3.1.10
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
typing==3.7.4.3
typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work
virtualenv==20.17.1
wcwidth==0.2.13
zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work

name: mpf
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=21.4.0=pyhd3eb1b0_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - importlib_metadata=4.8.1=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - more-itertools=8.12.0=pyhd3eb1b0_0
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=21.3=pyhd3eb1b0_0
  - pip=21.2.2=py36h06a4308_0
  - pluggy=0.13.1=py36h06a4308_0
  - py=1.11.0=pyhd3eb1b0_0
  - pyparsing=3.0.4=pyhd3eb1b0_0
  - pytest=6.2.4=py36h06a4308_2
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - toml=0.10.2=pyhd3eb1b0_0
  - typing_extensions=4.1.1=pyh06a4308_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.6.0=pyhd3eb1b0_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - asciimatics==1.14.0
      - distlib==0.3.9
      - filelock==3.4.1
      - future==1.0.0
      - importlib-metadata==4.8.3
      - importlib-resources==5.4.0
      - pillow==8.4.0
      - platformdirs==2.4.0
      - psutil==7.0.0
      - pyfiglet==0.8.post1
      - pyserial==3.5
      - pyserial-asyncio==0.6
      - ruamel-base==1.0.0
      - ruamel-yaml==0.10.23
      - terminaltables==3.1.10
      - typing==3.7.4.3
      - virtualenv==20.17.1
      - wcwidth==0.2.13
prefix: /opt/conda/envs/mpf

mpf/tests/test_BcpSocketClient.py::TestBcpSocketClientEncoding::test_roundtrip
mpf/tests/test_BcpSocketClient.py::TestBcpSocketClientEncoding::test_decode_command_string mpf/tests/test_BcpSocketClient.py::TestBcpSocketClientEncoding::test_encode_command_string mpf/tests/test_BcpSocketClient.py::TestBcpSocketClientEncoding::test_json_encoding_decoding mpf/tests/test_BcpSocketClient.py::TestBcpSocketClient::testReceiveMessages mpf/tests/test_BcpSocketClient.py::TestBcpSocketMultipleClients::testReceiveMessages
mpf/core/bcp/bcp_socket_client.py
mpf/core/bcp/bcp_socket_client.py