Skip to Content
0

PI REST Adapter – XML to JSON conversion

Mar 09 at 11:13 AM

72

avatar image
Former Member

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Pavan Dogiparthy Mar 09 at 12:17 PM
0

Hi,

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

Regards

Pavan

Show 1 Share
10 |10000 characters needed characters left 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)
0