Monday, 23 October 2017

Groovy/Java Script for XML alignment from Oracle system(Database)

(Oracle) system is sending the data in different JSON format which needs to convert to actual JSON format for passing to the mapping. Below are the source and target data, highlighted the modification shown below. After this conversion if we convert to xml then it can be passed to add the logic's in mapping.

Eg:

INPUT:
{
  "Root": {
    "items": {
      "count": "17",
      "tableName": "Table0",
      "columnNames": [
        "ContactId",
        "Salutation",
],
      "rows": [
        {
          "1906569"
          "Ms",}]
}

OUTPUT:
{
  "Root": {
    "items": {
      "count": "17",
      "tableName": "Table0",
      "columnNames": [
        "ContactId",
        "Salutation",
],
      "rows": [
        {
          "ContactId": "1906569"
          "Salutation": "Ms",}]

}



No comments:

Post a Comment