cancel
Showing results for 
Search instead for 
Did you mean: 

REST Adapter JSON Structure

silentbull
Participant
0 Kudos
330

Hi

I have a ECC->REST scenario. My target structure is as follows

Employees (Root Node)

name (Element)

email (Element)

The current json conversion is coming as

  1. {"employees":[
  2. {"name":"Shyam", "email":"gmail.com"},
  3. {"name":"Bob", "email":"gmail.com"},
  4. ]}

But the target system needs it as

  1. [
  2. {"name":"Ram", "email":"gmail.com"},
  3. {"name":"Bob", "email":"gmail.com"}
  4. ]

Please let me know how to remove the employees one.

I had used the option strip outer element in the communication channel which actually removed the MT_Employees only and not the root node.

I tried giving option Strip operation from Message(outer element). But that went into some error stating, can't insert into hierarchical request.

Please can someone help on this .

Accepted Solutions (1)

Accepted Solutions (1)

gabriel_alves
Explorer

Hello,

Try to go through this solution:

https://answers.sap.com/questions/273618/unable-to-remove-message-type-outer-node-from-rest.html

set the parameter "setIgnoredElements" for your element employees

Answers (1)

Answers (1)

0 Kudos

Hi,

Even simpler is you check both the checkboxes for -

  • Strip Operation from Message (Outer Element)
  • Strip Outer Element