Package org.codehaus.jackson.map

Examples of org.codehaus.jackson.map.ObjectMapper.writeValueAsBytes()


      try {
        Map<String, Integer> map = new HashMap<String, Integer>();
        map.put("mapKey", 1);
        ObjectMapper mapper = new ObjectMapper();
        mockMvc.perform(post("/users/map")
            .body(mapper.writeValueAsBytes(map))
            .contentType(MediaType.APPLICATION_JSON)
          .accept(MediaType.APPLICATION_JSON))
          .andDo(print())
          .andExpect(status().isOk());
     
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.