How to convert this json string to dict?
Question: After executing the following code:

    
    
    import json
    a = '{"excludeTypes":"*.exe;~\\$*.*"}'
    json.loads(a)
    

I get:

> Traceback (most recent call last): File "", line 1, in File
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/**init**.py",
> line 338, in loads return _default_decoder.decode(s) File
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py",
> line 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py",
> line 381, in raw_decode obj, end = self.scan_once(s, idx) ValueError:
> Expecting property name: line 1 column 2 (char 1)

So how can I convert 'a' to dict. Please note that the string is already in
'a' and I cannot add 'r' in front of it. Ideally, the string should have been
`{"excludeTypes":"*.exe;~\\\\$*.*"}`

Also, the following code doesn't work:

    
    
    import json
    a = '{"excludeTypes":"*.exe;~\\$*.*"}'
    b = repr(a)
    json.loads(b)
    


Answer: 
    import ast
    
    d = ast.literal_eval(a)
    

