Add a way to force a str in case #json is really required in a key

This commit is contained in:
Ben Jackson 2020-08-05 22:24:35 +01:00
commit ca63c08d6a
2 changed files with 3 additions and 1 deletions

View file

@ -544,6 +544,7 @@ def ExpandReferencesInString( orig_s,
def CoerceType( mapping: typing.Dict[ str, typing.Any ], key: str ): def CoerceType( mapping: typing.Dict[ str, typing.Any ], key: str ):
DICT_TYPES = { DICT_TYPES = {
'json': json.loads, 'json': json.loads,
's': str
} }
parts = key.split( '#' ) parts = key.split( '#' )

View file

@ -60,7 +60,8 @@
"stopOnEntry#json": "${StopOnEntry:true}", "stopOnEntry#json": "${StopOnEntry:true}",
"console": "integratedTerminal", "console": "integratedTerminal",
"args#json": "${args:[]}", "args#json": "${args:[]}",
"env#json": "${env:{\\}}" "env#json": "${env:{\\}}",
"igored#json#s": "string not json"
}, },
"breakpoints": { "breakpoints": {
"exception": { "exception": {