I got a scenario.
Required input and output are JSON.
// Input
{
\"OldObject\": {
\"Time\": 1351
You can do this transformation with JSON patch.
Example with jsonpatch-js:
var transformations = [
{ move: '/OldObject', to: '/NewObject' },
{ remove: '/NewObject/price' },
{ move: '/NewObject/Name', to: '/NewObject/Title' }
];
var oldObject = { "OldObject": { "Time": 1351160457922, "Name": "OName", "quantity": 100, "price": 10 } };
jsonpatch.apply(oldObject, transformations);
I did not test the provided, but should work like that.
There are Java implementations for JSON patch: