sajuptpm <sajup...@gmail.com> wrote: > >I am facing an issue while decoding json string using json.loads(jstring). >Its working, if i do json.dumps(eval(jstring)) before json.loads(jstring). >I could not figure out the issue. I want to avoide use of "eval" here.
The problem is that your string contains two instances of an escaped right bracket \] . That's not one of the characters you're allowed to escape in JSON. The rules are very strict. There are only 8 allowed escape codes, plus the \u#### construct. Note that you cannot just replace \] with ], because your string also contains one instance of \\] . Who is doing the JSON encoding? It appears to be doing it incorrectly. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list