JSON not serializing correctly
Application Type
Reactive, Service
Service Studio Version
11.50.11 (Build 47949)

We are trying to Serialize a Structure on a Server Action, but the JSON Deserialize does not include some attributes or creates an incorrect structure overall.

In this case we have the next values from our local variable before the json is created:

But the Json created is the following: "W27":{"W2702":"ASIV","W2703":"ALLIANCE SHIPPERS INC"}. The W2701 value is not included in the JSON.

Another example is the following loop:

As result we get the following JSON: "N9":[{"N902":"HEP2021082301"},{"N901":"MB"},{"N901":"DP","N902":"00023"}. Same problem as before, the "BM" value is not included in the JSON string.

We are getting this error multiple times throughout the JSON Serializer. The Structure contains multiple loops and it runs on a Server Action inside a Service Module.



Hi Gerardo,

The attributes are likely not getting serialized because they have a default value and you haven't filled the Serialize Default Values property to Yes, like on the image below:

Can you try again the JSON Serialize with the Serialize Default Values property to Yes?

Kind Regards,

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.