title: Why @ResponseBody returns sorted LinkedHashMap as not sorted?
body: <p>Here is SpringMVC Controller code snippet:</p>
  
  <pre><code>@RequestMapping(value = "/getCityList", method = RequestMethod.POST)
  public @ResponseBody LinkedHashMap&lt;String, String&gt; getCityList(@RequestParam(value = "countryCode") String countryCode, HttpServletRequest request) throws Exception {
      //gets ordered city list of country  [sorted by city name]
      LinkedHashMap&lt;String, String&gt; cityList = uiOperationsService.getCityList(countryCode); 
  
      for (String s : cityList.values()) {
          System.out.println(s); //prints sorted list  [sorted by name]
      }
      return cityList;
  }
  </code></pre>
  
  <p>Here is ajax call:</p>
  
  <pre><code>function fillCityList(countryCode) {
          $.ajax({
              type: "POST",
              url: '/getCityList',
              data: {countryCode:countryCode},
              beforeSend:function(){
                  $('#city').html("&lt;option value=''&gt;-- SELECT --&lt;/option&gt;" );
              }
          }).done(function (data) {
  
              console.log(data); // UNSORTED JSON STRING  [Actually sorted by key... not by city name]
  
          })
      }
  </code></pre>
  
  <p>Sorted LinkedHashMap returns as unsorted JSON object from getCityList method. Why order is changed during return process ? 
  Is LinkedHashMap converted to HashMap because of ResponseBody annotation? 
  I can convert my sorted object to json string via Gson library and return json string from my getCityList method but i don't like this solution. What can i do to provide javascript callback method with sorted list?  </p>