Skip to Content
avatar image
Former Member

PI REST Adapter – XML to JSON conversion

Hi All,

I have a scenario (XML–>REST->JSON) , I need to conver XML to JSON format in receiver channel.

and I set my DataType like:

And what I want to get in JSON is to be like:

but what I have got is lke:

As you can see, the 2 parts I marked in red are what I want to remove.

How to ignore this root element "list" & add outer Array[] .

Please advice me.

Best Regards.

dt.png (6.0 kB)
hope.png (3.5 kB)
got.png (4.7 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Mar 09 at 12:17 PM

    Hi,

    Enable the option Strip Operation from Message (Outer Element).

    Regards

    Pavan

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      thanks for reply.

      But I get error like this. Did I miss anything?

      org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted.

      cc.png (20.2 kB)