E-IB: How Do You Use REST Services Documents To Read In JSON Message That Starts With A Collection?

(Doc ID 2339358.1)

Last updated on DECEMBER 14, 2017

Applies to:

PeopleSoft Enterprise PT PeopleTools - Version 8.55 and later
Information in this document applies to any platform.

Goal

I seem to be running into an issue with a REST GET method in that the message returned from the system I am requesting data from goes into a Collection right away. It starts out with the collection and it has no root element above it. It seems that PeopleSoft can't handle that kind of message.

The Document structure that has to be used by PeopleSoft doesn't seem to handle this kind of message unless I am missing something. So looking to get any insight on how to create a document or use peoplecode to handle this situation. Below is a sample message of what is being returned and I am trying to read.

[{"name":"AD","id":"jfmly000000000001000"},{"name":"AD1","id":"jfmly000000000001305"},{"name":"AM","id":"jfmly000000000001201"}]

How do you use REST services documents to read in JSON message that starts with a Collection? Can I not use the document to read the data?
 
Every code example I see uses the document structure. do I have to write my own json parser or do you have an example of code for that?

 

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms