Forum Discussion

Surendar's avatar
Surendar
Contributor
8 years ago

How to find incoming data format(json,xml) dynamically in pipeline input view?

How to find incoming data format dynamically?

Say for example,

  1. If the incoming data is JSON then I need to perform certain validation and flow for JSON
  2. If the incoming data is xml then I to perform certain operations.

Can any one suggest How to find incoming data format during the run-time. by using single input view for the pipeline?

6 Replies

  • Igor_Bozhinovsk's avatar
    Igor_Bozhinovsk
    New Contributor III

    Thanks Alchemiz , the array is now spliited in two. One array with 100 elements and the other with the remaining elements.

    This is the current output :

    "ShipmentCreateDate": "01/01/2023",
    "ShipmentID": "1",
    "SerialNumbers": [
      [
        {
          "SerialNo": "123"
        },
    	{ "SerialNo":"456"
        }
      ],
      [
    	{
    	  "SerialNo": "101"
    	},
    	{
    	  "SerialNo": "102"
    	}
      ]
     ]
    

    I was wondering if something like this output is possible :

    "ShipmentCreateDate": "01/01/2023",
    "ShipmentID": "1",
    "SerialNumbers": [
      [
        {
          "SerialNo": "123"
        },
    	{ 
    	  "SerialNo":"456"
        }
      ]
    "ShipmentCreateDate": "01/01/2023",
    "ShipmentID": "1",
    "SerialNumbers": [
      [
    	{
    	  "SerialNo": "101"
    	},
    	{
    	  "SerialNo": "102"
    	}
      ]
     ]
    

    Where the first output would be the array with the 100 elements and the remaining fields that are not part of the array and the second output would be the array with the remaining elements and the fields that are not part of the array.

    Regards,
    Igor