0

How do you use string formatting on a json string or other strings that have brackets? This, you would work with as a dictionary, but I can't think of a good example:

payload = '''
{"accessToken": "{accessToken}","clientToken": "{clientToken}"}
'''.format(clientToken = clientToken, accessToken = accessToken)
martineau
  • 119,623
  • 25
  • 170
  • 301
JadeSpy
  • 140
  • 1
  • 8
  • Does this answer your question? [How to use python str.format inside a string of json format](https://stackoverflow.com/questions/39948645/how-to-use-python-str-format-inside-a-string-of-json-format) – abhigyanj Jan 23 '21 at 01:29
  • Yes it does. Thank you very much. – JadeSpy Jan 23 '21 at 02:39

0 Answers0