Question

4
Replies
963
Views
X
DanielR6574 Member since 2016 4 posts
Stratosphere Technical Consulting
Posted: 1 year ago
Last activity: 1 year ago
Closed

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***

Data Integration Java and Activities Data Integration
Moderation Team has archived post
Share this page LinkedIn