Skip to Content
author's profile photo Former Member
Former Member

JSON Object to Array as top level brackets

Hi All,

REST ...> PI ...> SAP

We have a Synchronous requirement where Rest service expects back response as JOSN Array (top level brackets) however the standard adapter is only creating JSON object using curly braces using jettison classes and does not support top level array

Looks like we may have to go with custom adapter module to add brackets to JSON object to make it look like JSON Array...do we have the code ?

Any one with suggestions are appreciated

Thank you

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jan 30, 2018 at 08:05 AM

    Hi Gaurav,

    In the REST sender channel, there is an option "Custom XML/JSON conversion rules". Try to enter the outer element name in the table and Array Type as true, it will give brackets instead of curly braces.

    Regards,

    Priyanka

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.