title: How to map one JSON schema to another?
body: <p>I have a requirement where I need to map an input JSON file to a specific output JSON schema, but not sure how to proceed with this. Should I proceed with converting from JSON to Java object, transform and convert back to JSON or is there any other way to handle this?</p>
  
  <p>My Input and output JSON looks like the examples below.</p>
  
  <p><em>Input:</em></p>
  
  <pre><code>[{
    "FirstName": "fgfgf",
    "BIRTH_DATE": "1988-06-25",
    "frm": "sdsd67ds-4937-fdf",
    "GENDER_CODE": "M",
    "ID": "4083-9b78-eab99231adc9",
    "LastName": "ddgd"
  }, {
    "FirstName": "gfgf",
    "BIRTH_DATE": "1973-03-02",
    "frm": "7e3b3dd6-97bc-d918065a642f",
    "GENDER_CODE": "O",
    "ID": "88e9-0253a00cde91",
    "LastName": "gfgsfg"
  }, {
    "FirstName": " dfsdfsdfgsd",
    "BIRTH_DATE": "1950-02-26",
    "frm": "9d30-9f23ed77ea1a",
    "GENDER_CODE": "M",
    "ID": "9b1b-090c179a31ea",
    "LastName": "RU dddas"
  }, {
    "cStage df": "cStage df",
    "dds": "cM1y",
    "ddsc": "cTgb",
    "grgfd": "cK1",
    "BId": "a431a5b4-4176-704bed5021f8",
    "fsfsdfsd": "7face4c8-ffa870cfbf2d"
  }, {
    "fvf": "cStage dgd",
    "dsdf": "cMff",
    "fgsd": "cTgf",
    "FirstName": "dfdfsdsf",
    "dfs": "c1",
    "BId": "a43-9d6d-704bed5021f8",
    "BIRTH_DATE": "1999-08-30",
    "msdrsdn": "727146-8e930fc1f662",
    "GENDER_CODE": "F",
    "ID": "6560a6cb-e01757819bcc",
    "LastName": "dfsdfsd"
  }]
  </code></pre>
  
  <p><em>Output:</em></p>
  
  <pre><code>[{
      "SENDER_NAME": "XYZ",
      "MARITAL_STATUS": "Unmarried",
      "GENDER_CODE": "F",
      "PHONE_NO": "576756754",
      "LAST_NAME": "ghghg",
      "FIRST_NAME": "hgdghd",
      "PHONE_CODE": "91",
      "GENDER": "F",
      "ID": "5765474",
      "ADDRESS": "500 fgdfgd,gdf",
      "BIRTH_DATE": 1523877361463,
      "gdfgg": "-86afad953b34",
      "DATE_TIME": 56546456,
      "A_BIRTH_DATE": "567546456",
      "C_INFO": {
        "CLINICAL": {
          "T": "1",
          "N": "0",
          "M": "1",
          "STAGE": "Stage I"
        },
        "PATHOLOGY": {
          "T": "1",
          "N": "1",
          "M": "1",
          "STAGE": "Stage I"
        }
      }
    },
    {
      "SENDER_NAME": "ABC",
      "MARITAL_STATUS": "Unmarried",
      "GENDER_CODE": "M",
      "PHONE_NO": "56456456",
      "LAST_NAME": "hghfg",
      "FIRST_NAME": "dgdfgd",
      "PHONE_CODE": "91",
      "GENDER_CODE": "M",
      "ID": "6456456456",
      "FULL_ADDRESS": "fgdfdfghdf,fdgfdg,fgfd45345",
      "BIRTH_DATE": 1523877413779,
      "ID": "b84e-4866a656cce8",
      "DATE_TIME": 1523877413779,
      "BIRTH_DATE": "67567657",
      "C_INFO": {
        "CLINICAL": {
          "T": "0",
          "N": "0",
          "M": "0",
          "STAGE": "Stage 0"
        },
        "PATHOLOGY": {
          "T": "0",
          "N": "0",
          "M": "0",
          "STAGE": "Stage 0"
        }
      }
    },
    {
      "SENDER_NAME": "RAC",
      "MARITAL_STATUS": "Unmarried",
      "GENDER_CODE": "F",
      "PHONE_NO": "56546546",
      "LAST_NAME": "hfghf",
      "FIRST_NAME": "gfhfghfg",
      "PHONE_CODE": "91",
      "GENDER_CODE": "M",
      "ID": "676745674",
      "_ADDRESS": "fgdfdfg",
      "BIRTH_DATE": 6756756756,
      "ID": "2e-a0d8-hghfg67ggh",
      "DATE_TIME": "Mon March 20 17:52:04 IST 2018",
      "BIRTH_DATE": "05212014",
      "C_INFO": {
        "CLINICAL": {
          "T": "0",
          "N": "0",
          "M": "1",
          "STAGE": "Stage IA"
        },
        "PATHOLOGY": {
          "T": "1",
          "N": "0",
          "M": "1",
          "STAGE": "Stage IB"
        }
      }
    }
  ]
  </code></pre>