我有以下json:
{"test":"example"}
我使用Faster XML Jackson中的以下代码.
JsonParser jp = factory.createParser("{\"test\":\"example\"}");
json = mapper.readTree(jp);
System.out.println(json.get("test").toString());
它输出:
"example"
杰克逊是否有设置删除双引号?
我有一个带有以下签名的端点
@RequestMapping(method = RequestMethod.GET, value = "/{id}", produces = {"application/json; charset=UTF-8"})
@Transactional(readOnly = true)
@ResponseBody
public HashMap<String, Object> myMethod(@PathVariable("id") Long id) {...}` 
我想调用 RestTemplate 进行单元测试。我该如何做到这一点,因为在方法中getForObject我无法将集合作为响应类型。
有什么想法吗?