1

I am new to python. I want to convert given string into json and I found json.loads() method to do that. But it generates json data in random order, i need them in orders because i am working with keys() and values() method of json.
Here is what I tried in the terminal:

    >> json.loads('{"a":"a","w":"w","b":"b","c":"c"}')
    >> {'b': 'b', 'w': 'w', 'c': 'c', 'a': 'a'}

Here the order in the json is jumbled. I want them in the same order I provided.

2

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.