Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I getting below result where my expected was as pasted below that , not sure why tWriteJson appends the [] for each element and how to eliminate that and get nulls printed where necessary.
used tWriteJson properties as attached and removed root element.
Result :-
{
"eligibility": [
{
"coreEligibility": [],
"categoryCode": [],
"consumerDeprivationCode": [],
"consumerId": [],
"consumerMaintenanceCode": [],
"coreEligibilitySegmentsId": [],
"correlationId": [],
"coverageCode": [],
"createdBy": [],
"createdOn": [],
"eligibilityEndReason": [],
"eligibilityStatusCode": "MANDATORY",
"endDate": [],
"exemptionCode": [],
"fileHandle": [],
"genericFieldDate1": [],
"genericFieldDate2": [],
"genericFieldDate3": [],
"genericFieldDate4": [],
"genericFieldText1": [],
"genericFieldText2": [],
"genericFieldText3": [],
"genericFieldText4": [],
"programCode": "HIP",
"programTypeCode": [],
"referralCountyCode": [],
"startDate": [],
"subProgramTypeCode": [],
"uiid": [],
"updatedBy": [],
"updatedOn": []
}
]
}
Expected result as below if no value present :-
{
"eligibility": [
{
"coreEligibility": null,
"categoryCode": null,
"consumerDeprivationCode": null,
"consumerId": null,
"consumerMaintenanceCode": null,
"coreEligibilitySegmentsId": null,
"correlationId": null,
"coverageCode": null,
"createdBy": null,
"createdOn": null,
"eligibilityEndReason": null,
"eligibilityStatusCode": "MANDATORY",
"endDate": null,
"exemptionCode": null,
"fileHandle": null,
"genericFieldDate1": null,
"genericFieldDate2": null,
"genericFieldDate3": null,
"genericFieldDate4": null,
"genericFieldText1": null,
"genericFieldText2": null,
"genericFieldText3": null,
"genericFieldText4": null,
"programCode": "HIP",
"programTypeCode": null,
"referralCountyCode": null,
"startDate": null,
"subProgramTypeCode": null,
"uiid": null,
"updatedBy": null,
"updatedOn": null
}
]
}
Hi,
maybe in Advanced settings of tWriteJSONField you can check Pass null values and empty string explicitly.
Send me Love and Kudos
Hi,
maybe in Advanced settings of tWriteJSONField you can check Pass null values and empty string explicitly.
Send me Love and Kudos