Skip to Content
0

Facing Issue while converting XML to JSON in REST Adavantco

Mar 26 at 01:07 PM

16

avatar image

Hi All,

I have used option Request body format in REST Advantco channel to convert xml to json.

XML input:

<?xml version="1.0" encoding="UTF-8"?>

<inventory>

<source>SAP</source>

<id>AM41N</id>

<quantity>4</quantity>

</inventory>

Can see below JSON format:

{

"inventory":{

"source":"SAP",

"id":"AM41N",

"quantity":"4"}

}

Required Format:

{

"inventory":{

"source":"SAP",

"id":"AM41N",

"quantity":4}

}

Quantity field should be integer instead of string. Due to I am not able to connect API.

Can you please suggest how can achieve required format?

Thanks & Regards,

Nanda

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Nanda Kumari Apr 10 at 09:42 AM
0

It got resolved.

Solution :

while Converting Request Body Format.

we can give Source Node - is path of the Quantity field : /inventory/Quantity/#text

Target Node : #number.

Share
10 |10000 characters needed characters left characters exceeded