title: JSONObject text must begin with '{' error
body: <p>I want to get the value of "name" from the following body:</p>
  
  <pre><code>[
    {
      "name": "ENTITY_CHANNELS",
      "description": "The list of channels use to deliver through.",
      "metadata": "{}"
    },
    {
      "name": "INTAKE_SFTP",
      "description": null,
      "metadata": "{\n  \"fields\":[\n    {\n      
  \"field_name\":\"user_uat\",\n      \"field_type\":\"string\",\n      
  \"field_required\":true, \n\t  \"field_description\": \"UAT User name\"\n    
  },\n    {\n      \"field_name\":\"user_prod\",\n      
  \"field_type\":\"string\",\n      \"field_required\":false, \n\t  
  \"field_description\": \"Production User name\"\n    },\n    {\n      
  \"field_name\":\"folder\",\n      \"field_type\":\"string\",\n      
  \"field_required\":true, \n\t  \"field_description\": \"Folder\"\n    },\n    
  {\n      \"field_name\":\"address_UAT\",\n      \"field_type\":\"string\",\n      
  \"field_required\":true, \n\t  \"field_description\": \"UAT address\"\n    
  },\n    {\n      \"field_name\":\"address_PROD\",\n      
  \"field_type\":\"string\",\n      \"field_required\":false, \n\t  
  \"field_description\": \"Production address\"\n    },\n    {\n      
  \"field_name\":\"port\",\n      \"field_type\":\"integer\",\n      
  \"field_required\":true, \n\t  \"field_description\": \"Port\"\n    },\n    
  {\n      \"field_name\":\"protocol_version\",\n      
  \"field_type\":\"version\",\n      \"field_required\":false, \n\t  
  \"field_description\": \"Protocol version\"\n    }\n  ]\n}"
    }
  ]
  </code></pre>
  
  <p>I've tried the following code:</p>
  
  <pre><code>String settingsTypeData = response.body().toString();
  JSONObject settingsTypeObject = new JSONObject(settingsTypeData);
  Assert.assertEquals(settingsTypeObject.get("name"), "ENTITY_CHANNELS");
  </code></pre>
  
  <p>But I keep on getting the error: JSONObject text must begin with '{' error. I would like to extract the value of "name". Can someone help me?</p>