# Handling pxObjClass Removal from JSON Generated via @pxConvertPageToString

**URL:** <https://forums.pega.com/t/handling-pxobjclass-removal-from-json-generated-via-pxconvertpagetostring/10542>\
**Category:** Knowledge Share\
**Tags:** communications-and-media, financial-services, user-experience, pega-platform, lead-system-architect\
**Created:** [January 20, 2026, 1:51pm UTC](https://forums.pega.com/t/handling-pxobjclass-removal-from-json-generated-via-pxconvertpagetostring/10542 "2026-01-20T13:51:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![KarthickM17452834](https://avatars.discourse-cdn.com/v4/letter/k/ce73a5/32.png) [@KarthickM17452834](https://forums.pega.com/u/KarthickM17452834)\
**Post date:** [January 20, 2026, 1:51pm UTC](https://forums.pega.com/t/handling-pxobjclass-removal-from-json-generated-via-pxconvertpagetostring/10542/1 "2026-01-20T13:51:25Z")

</div>

In Pega, the OOTB function **@pxConvertPageToString()** is commonly used to convert a clipboard page into a JSON string. However, the generated JSON includes the internal property **pxObjClass** , which is often not required when sharing the payload with external systems or downstream integrations.

Since the presence of **pxObjClass** depends on the underlying Pega page structure, we need an additional step to cleanse the JSON and produce a clean, consumer-friendly output.

#### **Step 1: Convert Page to JSON String**

Use the standard OOTB function: @pxConvertPageToString()

#### **Step 2: Remove pxObjClass Using Regex**

To strip all occurrences of `pxObjClass` from the JSON string, we can leverage the regex function:

@pxReplaceAllViaRegex(Param.Output,“(?s)(,\s\*"pxObjClass"\s\*:\s\*"[^"]+")|(\s\*"pxObjClass"\s\*:\s\*"[^"]+"\s\*,?)”,“”)
