Question
De Lage Landen Financial Services
US
Last activity: 9 Feb 2022 1:15 EST
Checking if field in incoming JSON payload has null value
Use Case:
As per organization standards, an API needs to be exposed which will update an object using functionality similar to JSON MERGE PATCH. As per MERGE PATCH convention, if object already has a property called "type" with value as "Standard", to remove this property from the object, the incoming payload will be:
{ "data": { "type": null }
}
Problem statement:
When parsing the incoming payload using @pxConvertStringToPage(), Pega is not mapping the fields with null values on the clipboard.
Is there a way to get the fields with null values in payload mapped to the clipboard so that they can be evaluated using @propertyExists() and @propertyHasValue() functions - if property exists in payload and does not have value, remove the property from the work object.
PRPC v7.3 (no framework)