This is the string I'm receiving from the get request:
{'company_code': u'ha', 'from-date': u'', 'to-date': u'', 'ledger_type': u'CLNT', 'cost_center': u'ALL', 'margin': u'wtmg'}
Now, I'm completely confused what to do with this. I want to make str['company_code'] give me "ha" as output.
But even if I do json.dumps() or loads() on it, I'm just not able to access it.
Any help?
Edit: After sending a JSON string from the javascript client, and taking a json.dumps, I get this:
{"company_code": "ha", "from-date": "", "to-date": "", "ledger_type": "CLNT", "cost_center": "ALL", "margin": "wtmg"}
which is a string. I'm not sure how to go forward from here.
json.dumpsand that's why python is issuing it's unicode specialu""formatting. Is that right?