One approach is to build a REST service and let PRPC automatically map the message data by selecting JSON in the Map to field. An example of how to do this can be found in the mesh post “Using JSON in a RESTFul CRUD Service” at the following URL: https://mesh.pega.com/message/185352#185352
For further details on the approach, also see the following:
Just keeping in mind that any content posted to this space is viewable by customers and partners. If it is appropriate to be viewed by that audience, please, by all means, post the content here for the entire communities' benefit.
If you need help posting/uploading any content, let me know outside of this discussion and I can help you out.
PS. I am out tomorrow, so may have to wait until Monday depending on when/if you get in touch.
"title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
"body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
The ClipboardPage java API has JSON and XML conversion methods - adoptJSONObject, adoptJSONArray, and adoptXMLForm for populating a clipboard page with JSON/XML data, getJSON and getXML for converting the contents of a clipboard page to an JSON/XML string value.
So it looks like we can use the 'adoptJSONObject' method here....
I built a 4 properties (just 'text') to mirror the JSON structure above 'userID', 'id', 'title' and 'body', and a simple Activity to create a Page and use a Java Step to call the 'adoptJSONObject' method:
Here's a screenshot of the Properties and the Activity Steps (I'll showt the JAVA step further down)
Here's the Parameters tab : for convenience I create a 'mirror' local variable of the parameter 'JSONString' - this just make the Java Step easier to write (we can refer directly to local variables, rather than having to fetch a parameter) - I transfer the PARAM to the LOCAL variable in the first step as you can see above.
And just a work page to that has the class of where my properties are:
<body>quia et suscipit
suscipit recusandae consequuntur expedita et cum
reprehenderit molestiae ut ut quas totam
nostrum rerum est autem sunt rem eveniet architecto</body>
<title>sunt aut facere repellat provident occaecati excepturi optio reprehenderit</title>
Give it a shot on your JSON and see whether it works for you or not !