title: str to dict in python, but maintain the sequence of json attributes
body: <p>I've tried ast.literal_eval and json.loads but both of these, doesn't maintain the sequence of json attributes when a string is provided. Please see the following example -</p>
  
  <h1>String before providing it to json.loads -</h1>
  
  <pre><code>{
      "type": "array",
      "properties": {
          "name": {
              "type": "string"
          },
          "i": {
              "type": "integer"
          },
          "strList": {
              "type": "array",
              "items": {
                  "type": "string"
              }
          },
          "strMap": {
              "type": "object"
          },
          "p2": {
              "type": "array",
              "items": {
                  "type": "object",
                  "properties": {
                      "name": {
                          "type": "string"
                      },
                      "i": {
                          "type": "integer"
                      },
                      "p3": {
                          "type": "object",
                          "properties": {
                              "name": {
                                  "type": "string"
                              },
                              "i": {
                                  "type": "integer"
                              },
                              "p4": {
                                  "type": "object",
                                  "properties": {
                                      "name": {
                                          "type": "string"
                                      },
                                      "i": {
                                          "type": "integer"
                                      }
                                  }
                              }
                          }
                      }
                  }
              }
          },
          "p3": {
              "type": "array",
              "items": {
                  "type": "object",
                  "properties": {
                      "name": {
                          "type": "string"
                      },
                      "i": {
                          "type": "integer"
                      },
                      "p4": {
                          "type": "object",
                          "properties": {
                              "name": {
                                  "type": "string"
                              },
                              "i": {
                                  "type": "integer"
                              }
                          }
                      }
                  }
              }
          },
          "b": {
              "type": "boolean",
              "required": true
          }
      },
      "classnames": {
          "rootNode": {
              "classname": "com.agent.Person"
          },
          "p2": {
              "classname": "com.agent.Person2",
              "p3": {
                  "classname": "com.agent.Person3",
                  "p4": {
                      "classname": "com.agent.Person4"
                  }
              }
          },
          "p3": {
              "classname": "com.agent.Person3",
              "p4": {
                  "classname": "com.agent.Person4"
              }
          }
      }
  }
  </code></pre>
  
  <h1>String after providing it to json.loads -</h1>
  
  <pre><code>{
      'classnames': {
          'p2': {
              'classname': 'com.agent.Person2',
              'p3': {
                  'classname': 'com.agent.Person3',
                  'p4': {
                      'classname': 'com.agent.Person4'
                  }
              }
          },
          'p3': {
              'classname': 'com.agent.Person3',
              'p4': {
                  'classname': 'com.agent.Person4'
              }
          },
          'rootNode': {
              'classname': 'com.agent.Person'
          }
      },
      'properties': {
          'b': {
              'required': True,
              'type': 'boolean'
          },
          'i': {
              'type': 'integer'
          },
          'name': {
              'type': 'string'
          },
          'p2': {
              'items': {
                  'properties': {
                      'i': {
                          'type': 'integer'
                      },
                      'name': {
                          'type': 'string'
                      },
                      'p3': {
                          'properties': {
                              'i': {
                                  'type': 'integer'
                              },
                              'name': {
                                  'type': 'string'
                              },
                              'p4': {
                                  'properties': {
                                      'i': {
                                          'type': 'integer'
                                      },
                                      'name': {
                                          'type': 'string'
                                      }
                                  },
                                  'type': 'object'
                              }
                          },
                          'type': 'object'
                      }
                  },
                  'type': 'object'
              },
              'type': 'array'
          },
          'p3': {
              'items': {
                  'properties': {
                      'i': {
                          'type': 'integer'
                      },
                      'name': {
                          'type': 'string'
                      },
                      'p4': {
                          'properties': {
                              'i': {
                                  'type': 'integer'
                              },
                              'name': {
                                  'type': 'string'
                              }
                          },
                          'type': 'object'
                      }
                  },
                  'type': 'object'
              },
              'type': 'array'
          },
          'strList': {
              'items': {
                  'type': 'string'
              },
              'type': 'array'
          },
          'strMap': {
              'type': 'object'
          }
      },
      'type': 'array'
  }
  </code></pre>
  
  <p>Can anyone please suggest an alternative or something in python which keeps the sequence of attributes as they are and convert the string into the python dictionary?</p>