A
A
Andrey Romanov2021-10-29 13:51:39
Python
Andrey Romanov, 2021-10-29 13:51:39

How to convert string to dictionary?

Good day. I am getting the line:

{"e":"kline","E":1635503250823,"s":"ADXUSDT","k":{"t":1635503220000,"T":1635503279999,"s":"ADXUSDT","i":"1m","f":105085,"L":106653,"o":"0.86950000","c":"0.89190000","h":"0.89840000","l":"0.86080000","v":"699027.00000000","n":1569,"x":False,"q":"615372.92110000","V":"413721.00000000","Q":"364929.20050000","B":"0"}}

I need to convert this string to a dictionary, or to json. I don't understand how to do this because the string has a nested array "k" and I get an error when converting. Please tell me how to convert this string to a dictionary / array

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2021-10-29
@Vindicar

Python has a built-in json module . First link on google for "python json".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question