function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mike FairchildMike Fairchild 

Winter 18 Continuation Parsing JSON?

Our full copy sandbox was upgrade to winter 18 last Friday and we have noticed in some circumstances that the continuation is parsing the returned JSON and only returning the first key in the json.

Example JSON response:
{
    "addressList": [{
        "defaultShipping": "false",
        "defaultBilling": "false",
        "label": "Home Address",
        "internalId": 123456789,
        "country": "United States",
        "addressee": "Test Tester",
        "addrText": "Test Tester",
        "isResidential": "false",
        "override": "true"
    }],
    "creditCardList": [{
        "internalId": 123456789,
        "ccLastFour": "1111",
        "ccExpireDate": "2019-01-01T00:00:00Z",
        "ccName": "Test Tester",
        "paymentMethod": {
            "internalId": 5,
            "name": "VISA"
        },
        "ccDefault": "false"
    }],
    "isoCurrency": "USD"
}

Here is a Debug of the continuation response
System.debug('RESPONSE: ' + JSON.serialize(response.getBody()));

14:19:32:020 USER_DEBUG [228]|DEBUG|JSON  RESPONSE: "[{defaultShipping=false, defaultBilling=false, label=Home Address, internalId=123456789, country=United States, addressee=Test Tester addrText=Test Tester, isResidential=false, override=true}]"

 
Mike FairchildMike Fairchild
I verified our code hasn't changed and it matched Production which works won Summer 17.
Mike FairchildMike Fairchild
I have narrowed down the issue to GET requests that return a JSON object. Any POSTs in continuations are working properly. A GET request that returns a list works properly, it's only when the GET response returns an object like my example, the continuation returns the first LIST that is found instead of the entire object.