Question
Stratosphere Technical Consulting
US
Last activity: 15 Jun 2019 9:15 EDT
adoptJSONObject in java step does not use pxExternalName qualifier set on properties
I need to be able to convert JSON to Page but its not comming from a web service so no Connect-REST or Service-REST is involved.
I'm using adoptJSONObject in a java step in an activity to parse the JSON as follows:
I have a property "oid" with pzExternalName qualifier set to "$oid".
I'm getting:
The reference $oid is not valid. Reason: invalid property name: '$oid'
How do Iget around this problem?
Java Step
####################
ClipboardPage pgTemp = null;
String pageContent = "{\"id\":{\"$oid\":\"12345678\"}}";
try{
pgTemp = ThreadContainer.get().getPublicAPI().createPage("<my class>","PageTemp");
pgTemp.adoptJSONObject(pageContent);
} catch(InvalidStreamError e){
oLog.error("Test:Invalid JSON Stream for data page params : "+e.getMessage());
} catch(Exception e){
oLog.error("Test:Expection : "+e.getMessage());
}
***Edited by Moderator: Pallavi to update platform capability tags***