Json null shows as ""

Not sure if this is something I’m doing wrong on my part but I have this structure (only showed relevant part to avoid confusion), this is a upload form.

My issue is the double quotes even when my summer note lite text area is completely empty I ideally need this to be null as when I then try add a default value on my front end when this field is null doesn’t count the value as null meaning the default data is not shown and is left blank.

How about a ternary that inserts null when the value received is an empty string?

Ill have a look into this tomorrow I was also thinking something like a condition or ternary, any examples about how I would go about this for nested structure? im new to JSON in Wappler and can’t seem to find the correct way to just edit say html_field_1 alone while keeping the rest the same. I need the json to stay as a whole to then insert to a single database field (or to rebuild the json before I insert)

thanks for the advice

Keep it simple by breaking it down into variables with the ternaries or conditions, and then put the variables in the json.

For those who also need “” as null I think i’ve found a solution still testing this atm but this is what I did:

I store stringily_return in my database field.

You can probably simplify this but this was how I was testing responses in each step.

It is very default behavior that inputs fields that are empty post an empty string to the server. If you want to insert it as null value in the database then you have to convert that on the server.

Thanks for the reply my goal was to just make sure that when its sent to the database the "" are swapped for null the replace I posted after I use .toJSON() seems to be working great at least with the few tests I've done to use a default value

Before I added the set values in this would not show any text, after I added the set values it detects it as null and works great

Just wasn't sure if there was a better way to achieve this.