E-IB: JSON Messages and Elements in an Array Representation (Doc ID 1612277.1)

Last updated on JANUARY 08, 2014

Applies to:

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

Symptoms

Sample Environment:
------------------
Tools 8.53.06
Test environment

Issue:
------
The site rep is generating an array using Document data types and rest based web services. When creating more than one array elements, JSON message format is showing  data contained within square brackets indicating that it is an array, but when the site rep has only one element for the array JSON message is not formatted correctly.


Reported Behaviour:
-------
1)  Example of the issue.

 JSON message format when 2 data elements: Note the planDetails is an array and has 2 items.  Data within planDetails are contained within square brackets indicating that it is an array.

{
    "StudentSnapShot": {
        "academicDetails": [
            {
                "careerTitle": "Graduate",
                "planDetails": [
                    {
                        "academicTitle": "Major",
                        "planDetails": [
                            "Electrical Engineering (Eng)",
                            "Electrical Engineering (MS)"
                        ]
                    },
                    {
                        "academicTitle": "GRNon-Matric",
                        "planDetails": [
                            "GR Gen Non-Matric (NM)",
                            "Graduate Non-Deg Option (NDO)"
                        ]
                    }
                ]
            }
        ]
    }
}
·

 JSON message format with one data element:
When the planDetails has only one data element for the array, the planDetails data is contained within curly “{“ brackets instead of “]” brackets.

{
    "StudentSnapShot": {
        "academicDetails": [
            {
                "careerTitle": "Undergraduate",
                "planDetails": {
                    "academicTitle": "Major",
                    "planDetails": [
                        "Electrical Engineering (BS)"
                    ]
                }
            }
        ]
    }
}


Cause

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