From ca63c08d6a64085250d10a655b6729995939fe7b Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Wed, 5 Aug 2020 22:24:35 +0100 Subject: [PATCH] Add a way to force a str in case #json is really required in a key --- python3/vimspector/utils.py | 1 + support/test/python/simple_python/.vimspector.json | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/python3/vimspector/utils.py b/python3/vimspector/utils.py index 02b0c85..bc7c168 100644 --- a/python3/vimspector/utils.py +++ b/python3/vimspector/utils.py @@ -544,6 +544,7 @@ def ExpandReferencesInString( orig_s, def CoerceType( mapping: typing.Dict[ str, typing.Any ], key: str ): DICT_TYPES = { 'json': json.loads, + 's': str } parts = key.split( '#' ) diff --git a/support/test/python/simple_python/.vimspector.json b/support/test/python/simple_python/.vimspector.json index a25a75b..044c669 100644 --- a/support/test/python/simple_python/.vimspector.json +++ b/support/test/python/simple_python/.vimspector.json @@ -60,7 +60,8 @@ "stopOnEntry#json": "${StopOnEntry:true}", "console": "integratedTerminal", "args#json": "${args:[]}", - "env#json": "${env:{\\}}" + "env#json": "${env:{\\}}", + "igored#json#s": "string not json" }, "breakpoints": { "exception": {