json - readValue() no working with TypeReference -


i writing following code convert json sting list of object.

list<myobject> myresponse = new arraylist<myobject>(); myresponse = new objectmapper().readvalue(responsestring, new typereference<list<myobject>>(){}); 

but eclipse complaining following error:

the method readvalue(string, class<t>) in type objectmapper not applicable arguments (string, new typereference<list<myobject>>(){}) 

what can possible error?

issue import of typereference. using

import com.fasterxml.jackson.core.type.typereference

instead of

import org.codehaus.jackson.type.typereference


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -