Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Dump Characters set to the JSON request

SA-60804

Summary



Dump characters are set to the JSON request when using the pxConvertPageToString out-of-the-box function.


Error Messages



Not Applicable


Steps to Reproduce

  1. Create a main page with a page list.
  2. Convert the main page to a JSON object using pxConvertPageToString out-of-the-box function.

Root Cause



For a few scenarios, JSON object has dump characters (such as alphanumeric characters) instead of attributes.

For example, 

The expected format is: "PropertyrDetails":{"Property1":""4545",""Property2":"xyz"}

However, JSON object is created in the format: {"3":{"Property1":""4545",""Property2":"xyz"}


Resolution



​​​​Perform the following local-change:

Include the below Java code in the activity instead of the pxConvertPageToString function:

PublicAPI tools = (PegaAPI) ThreadContainer.get().getPublicAPI();

ClipboardPage stepPage = tools.getStepPage();
String retValue = stepPage.getJSON(false);

return retValue;

Published September 18, 2018 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us