I get two different kind of response json in two different scenario from single RESTful web service, how to parse the following response json with Jackson??
response:{
result:"0"
}
and
response:{
result :{
fname: "abc",
lname: "xyz"
}
}
You can deserialize as a
JsonNodeat the bare minimum and do some logic to determine the correct type. If you are looking for a specific solution please add some more details to your question. Here is something to get you started: