0

I have a json object:

 {"Result":{"code":0,"description":"success"} , "Tickets":[{ "TicketDetails":[ {"Key":"tknum","Value":888}, {"Key":"tkDescription","Value":"test"}, ], "Requestor":[ {"Key":"name","Value":"abc"}, {"Key":"add","Value":"xyz"}, ] }, { "TicketDetails":[ {"Key":"tknum","Value":333}, {"Key":"tkDescription","Value":"test1"}, ], "Requestor":[ {"Key":"name","Value":"abc2"}, {"Key":"add","Value":"xyz3"}, ] } ] } 

I dont want to use JSON Parser. Is it possible to read this JSON directly to a java pojo. Example:

ObjectMapper mapper=new ObjectMapper(); TicketInfo info=mapper.readValue("above Json object",TicketInfo.class); 
4
  • You state that you don't want to parse the JSON, and your question title states that you want to use Jackson -- but how do you think Jackson works? Hint: it parses JSON. This makes your question confusing. Commented Mar 16, 2017 at 19:30
  • HI, apologies for that. I do not want to use the Tree model of Jackson. Commented Mar 16, 2017 at 19:36
  • What do you want to use? Commented Mar 16, 2017 at 19:39
  • What exactly are you trying to achieve ? Commented Mar 16, 2017 at 21:28

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.