https://api.jquery.com/jquery.getjson/文件写的很清楚,data是用$.parseJSON()解析response而来$.get、$.post这些都一样是$.ajax的捷径版,重点在dataType设为'json',不过默认的Intelligent Guess只要server有回适当的content-type header,也是会自动parseJSON你可以试看看$.get(url, function(data) {...}, 'text')和$.get(url, function(data) {...}, 'json') data是什么型别server端的spring如果是@RestController/@ResponseBody,回传值会经过HttpMessageConverter转换,默认的有byte[] →application/octet-stream、String → text/plainResource → 看resource档案种类其他各种物件 → application/json (看classpath上有哪个json library会有不同的默认converter)Map会变成JSON字串是因为有converter,String不会再转换