Skip to Content
avatar image
Former Member

Facing Issue while converting XML to JSON in REST Adavantco

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Apr 10 at 09:42 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded