tJavaRow to output JSON

How can I return JSON from my tJavaRow component? The code (shown below) shows that I'm creating the desired JSON, but I don't know how to pass it along as the output of the component. I see that I can use the Talend Document type as schema output, but the Java JSON type is not compatible. Is there a Talend type that is? Or is there a Type that I can cast to? My end goal is to be able to return the JSON to the client (via RESTResponse)

Re: tJavaRow to output JSON

I was able to resolve this by simply setting the tJavaRow components output schema to string and using toString() on the java JSON object. I then passed the string output directly to the RESTResponse which in turn responds with JSON.

Re: tJavaRow to output JSON

I was able to resolve this by simply setting the tJavaRow components output schema to string and using toString() on the java JSON object. I then passed the string output directly to the RESTResponse which in turn responds with JSON.