%JSON.Adaptor default manner is rid out the null value properties when %JSONExport method invokes. There is some default parameter are used to achieve this while exporting. You need to enable parameter in your class definition. The %JSONNULL parameter is used to export all the field and display even the property has null values. Once you have added the parameter and try export the itemdetails object
Class Samples.AllItems Extends (%JSON.Adaptor, Ens.Response)
{
Parameter %JSONNULL As BOOLEAN = 1;
Property ItemtId As %String;
Property itemName As %String(MAXLEN = 100);
Property itemStockNumber As %String(MAXLEN = 150);
Property itemType As %String;
Property itemPriority As %String;
Property itemDetailData As %String(MAXLEN = 10000);
}
"ItemId": "test",
"Item": [
{
"ItemtId": null,
"itemName": null,
"itemStockNumber": 123,
"itemType": "test",
"itemPriority": "High",
"itemDetailData": null
}
]
}
- Log in to post comments
.png)
.png)

