I am pretty new to json and normally donot use do much coding. I want a service which takes below json string as input
{
"var": "test11",
"_env": {
"activation": "wm6a93e3a80-0307-12cc-96e6-d79883bf841a",
"uuid": "48cdc2d0-0212-11e6-8315-d79883bf841a",
"eventID": 49167,
"recvTime": "Thu Apr 14 00:27:03 PDT 2016"
}
}
and spit out output as
{
"var": "test11"
}
and
{
"_env": {
"activation": "wm6a93e3a80-0307-12cc-96e6-d79883bf841a",
"uuid": "48cdc2d0-0212-11e6-8315-d79883bf841a",
"eventID": 49167,
"recvTime": "Thu Apr 14 00:27:03 PDT 2016"
}
}
The is just an example. It can contain more objects in json string and _env won't always appear at the end.
Is there any simple way to achieve using jackson API ?