# Is it possible to pass value null in JSON request?

**URL:** <https://forums.pega.com/t/is-it-possible-to-pass-value-null-in-json-request/9821>\
**Category:** General\
**Tags:** 8-8-4, pega-platform\
**Created:** [August 7, 2025, 4:00pm UTC](https://forums.pega.com/t/is-it-possible-to-pass-value-null-in-json-request/9821 "2025-08-07T16:00:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanieleD9965](https://avatars.discourse-cdn.com/v4/letter/d/85f322/32.png) [@DanieleD9965](https://forums.pega.com/u/DanieleD9965)\
**Post date:** [August 7, 2025, 4:00pm UTC](https://forums.pega.com/t/is-it-possible-to-pass-value-null-in-json-request/9821/1 "2025-08-07T16:00:12Z")

</div>

Hi,

I’ve a question. I’ve a Data transform that set values in a Page. And this Page is passed to a Data\_Page that invoke an external service rest, using the page as Request.

Now, for some reason, I need to pass a null value.

Let’s give an example of what I expect:

```auto
​
{
   "var1":"value1",
   "var2":"value2",
   "var3": null
}

```

How can I accomplish this?

I’d like to understand if Pega provides a method, a value or anyhting else, to set the value of a property to null, or to a value that the Invoke rule would translate into null value.

Best regards

---

<div class="post-metadata">

**Author:** ![lakhank7](https://avatars.discourse-cdn.com/v4/letter/l/ecb155/32.png) [@lakhank7](https://forums.pega.com/u/lakhank7)\
**Post date:** [August 8, 2025, 5:41am UTC](https://forums.pega.com/t/is-it-possible-to-pass-value-null-in-json-request/9821/2 "2025-08-08T05:41:27Z")

</div>

@DanieleD9965

Hi you create a Json DT in pega and then set the empty behaviour as null . Using this I was able to pass null in JSON.

In my case pyNote property is empty. So Pega is setting null by default in this case. You can use the same logic .

 ![JSONDT.png](https://pega1.discourse-cdn.com/pega/original/2X/1/14d127620b8809890352dee778a1331a231db8a4.png)

 ![DT.png](https://pega1.discourse-cdn.com/pega/original/2X/e/e6e41c4523e841c1d47dfff6bdbd426c20be4a62.png)

---

<div class="post-metadata">

**Author:** ![DanieleD9965](https://avatars.discourse-cdn.com/v4/letter/d/85f322/32.png) [@DanieleD9965](https://forums.pega.com/u/DanieleD9965)\
**Post date:** [August 8, 2025, 6:55am UTC](https://forums.pega.com/t/is-it-possible-to-pass-value-null-in-json-request/9821/3 "2025-08-08T06:55:12Z")

</div>

@lakhank7thanks for your response.

I see that you are using a Data Trasform Json. Can I achieve the same result with a Data Transform clipboard?

---

<div class="post-metadata">

**Author:** ![lakhank7](https://avatars.discourse-cdn.com/v4/letter/l/ecb155/32.png) [@lakhank7](https://forums.pega.com/u/lakhank7)\
**Post date:** [August 8, 2025, 7:58am UTC](https://forums.pega.com/t/is-it-possible-to-pass-value-null-in-json-request/9821/4 "2025-08-08T07:58:29Z")

</div>

@DanieleD9965

There are functions like pxConvertPageToString but they are only used to convert clipboard page to JSON/XML but they will not be helpful in your scenario. Also , if we use this function , the output will be containing pxObjClass which needs to be omitted before sending it to other system.

---

<div class="post-metadata">

**Author:** ![DanieleD9965](https://avatars.discourse-cdn.com/v4/letter/d/85f322/32.png) [@DanieleD9965](https://forums.pega.com/u/DanieleD9965)\
**Post date:** [August 8, 2025, 8:39am UTC](https://forums.pega.com/t/is-it-possible-to-pass-value-null-in-json-request/9821/5 "2025-08-08T08:39:35Z")

</div>

PP

@lakhank7thank again for your kind response.

The point is that i have a DT Clipboard that populates a Page. That Page is passed to a Data Type, that use to populate it as Page Request of a connect-rest.

So I do not use json

I have something like this, in my DT:

```auto
PageReq.var1 = "val1"
PageReq.var2 = "val2"
PageReq.var3 = ?

```

than PageReq it’s going to populate a Request in a Connect-Rest, leaving the translation in json to the internal Pega method. I’d like to know what value put for var3 in order to allow Pega to send as Request of Connector the value null.

Your solution is good, but non applicable in my scenario

---

<div class="post-metadata">

**Author:** ![lakhank7](https://avatars.discourse-cdn.com/v4/letter/l/ecb155/32.png) [@lakhank7](https://forums.pega.com/u/lakhank7)\
**Post date:** [August 8, 2025, 9:10am UTC](https://forums.pega.com/t/is-it-possible-to-pass-value-null-in-json-request/9821/6 "2025-08-08T09:10:42Z")

</div>

@DanieleD9965 I dont think there is any OOTB rule which can help you in your scenario. You need to either create a custom function .
