Link to home
Start Free TrialLog in
Avatar of Rohit Bajaj
Rohit BajajFlag for India

asked on

Deserializing a json string using jackson

HI,
I am using     private static final ObjectMapper mapper = new ObjectMapper();
and trying to do :
        mapper.readValue(value, List.class);
Its giving compile time error: cannot resolve method readValue...
Here my value will be a string liek = ["option1", "option2"]
a json array and i want to convert it to List<String> object.

How should i do it ?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Jim Riddles
Jim Riddles
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The solution answers the author's question.