AnsweredAssumed Answered

Which libraries to import to use the class JSON, class XMLSerializer, JSONSerializer

Question asked by shivpandey752937 on Apr 21, 2017
Latest reply on Apr 21, 2017 by shivpandey752937

Hi,

 

I wanted to know which libraries we can import to use the class JSON, class XMLSerializer, JSONSerializer.

I am trying to make a JSON to XML converter in Dell Boomi. The Code I am using is:

 

"

for( int i = 0; i < dataContext.getDataCount(); i++ ) {
InputStream is = dataContext.getStream(i);
Properties props = dataContext.getProperties(i);

 

//"JSON" is set already as Dynamic Process Property which has the JSON data

 

String str= ExecutionUtil.getDynamicProcessProperty("JSON");
JSON json = JSONSerializer.toJSON( str )
XMLSerializer xmlSerializer = new XMLSerializer()
xmlSerializer.setTypeHintsCompatibility( false )
String xml = xmlSerializer.write( json )

 

ExecutionUtil.setDynamicProcessProperty("XML", xml, false);

 

dataContext.storeStream(is, props);
}

"

Please let me know which libraries i need to import to successfully run this code.

 

Regards

Shivam

Outcomes