title: Json data serialized with JsonConvert.SerializeObject is always string in ASP.NET Web API
body: <p>I am developing a ASP.NET MVC Web Api. Project. I am returning data with JSON format. Before I return data to user I serialize data using <code>JsonConvert.SerializeObject</code> to change their json property names.My code return  data in JSON format. But with an issue. That is it always return data into string even if the data is array or object.</p>
  
  <p>This is my action method that returns json.</p>
  
  <pre><code>public HttpResponseMessage Get()
          {
              IEnumerable&lt;Region&gt; dbRegions = regionRepo.GetCachedRegions();
              List&lt;ContentRegion&gt; regions = new List&lt;ContentRegion&gt;();
              if(dbRegions!=null &amp;&amp; dbRegions.Count()&gt;0)
              {
                  foreach(var region in dbRegions)
                  {
                      ContentRegion contentRegion = new ContentRegion
                      {
                          Id = region.Id,
                          ImageUrl = Url.AbsoluteContent(region.ImagePath),
                          SmallImageUrl = (String.IsNullOrEmpty(region.ImagePath))?null:Url.AbsoluteContent(CommonHelper.GetImageUrl(region.ImagePath,AppConfig.SmallThumbSuffix)),
                          MediumImageUrl = (String.IsNullOrEmpty(region.ImagePath))?null:Url.AbsoluteContent(CommonHelper.GetImageUrl(region.ImagePath,AppConfig.MediumThumbSuffix)),
                          Name = region.Name,
                          MmName = region.MmName,
                          Description = region.Description,
                          MmDescription = region.MmDescription,
                          Latitude = region.Latitude,
                          Longitude = region.Longitude
                      };
                      regions.Add(contentRegion);
                  }
              }
              string json = JsonConvert.SerializeObject(regions);
              if(!string.IsNullOrEmpty(json))
              {
                  json = json.Trim(new char[] { '"' });
              }
              return new HttpResponseMessage(HttpStatusCode.OK)
              {
  
                  Content = new ObjectContent(json.GetType(),json,Configuration.Formatters.JsonFormatter)
              };
          }
  </code></pre>
  
  <p>Actually this code should return Json array. But when I parse data from client (from Android using Volley). It cannot be parsed into Json Array.</p>
  
  <p>This is the data I get:</p>
  
  <p><a href="https://i.stack.imgur.com/t7Ueo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t7Ueo.png" alt="enter image description here"></a></p>
  
  <p>As you can see the double quote both in the beginning and at the end. The reason I cannot parse it into array in Volley is it is returning as a string because of that double. How can I serialize it trimming that quote? I used trim, but not removed.</p>