jackson deserialization json to java-objects

前端 未结 4 824
时光取名叫无心
时光取名叫无心 2020-12-09 08:18

Here is my Java code which is used for the de-serialization, i am trying to convert json string into java object. In doing so i have used the following code:



        
4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-09 08:48

     JsonNode node = mapper.readValue("[{\"id\":\"value11\",\"name\": \"value12\",\"qty\":\"value13\"},"
    
     System.out.println("id : "+node.findValues("id").get(0).asText());
    

    this also done the trick.

提交回复
热议问题