Is there a way to recursively parse the string to get the dict?
string:
string = 'a {\
b: text;\
c {\
d: text;\
}\
}';
out:
{
'a' : {
'b': 'text',
'c': {
'd' : 'text';
}
}
}
upd: I'm new in Python, and I don't have a ready solution in the form of a library and etc, I want to understand the logic (any code if it possible or theory) of the algorithm for this problem
dict. And I want to understand the algorithm