I want to send something like this from the client to the rest service
jsonObj = { "info" : { "field1" : "val1".. ..... "fieldN" : "valN".. } }
And I am not sure how can I handle this using a rest service using
Jersey and Jackson in Java
I do not want to create a new info class with using Jackson properties with N field as they are going to change always. I just want to grab the jsonObject which is inside the jsonObject and operate on that as JsonObject.
Any thoughts ?
Assuming you have a root object that you are reading the result into, you could define docInfo as a Map<String, Object>
within your jsonObj. This will probably work, but I can't give it a go presently.
If you don't have a root object you can just use a Map<String, Object>
as your root object and play with it from there. That Map could contain other maps for nested json objects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With