We also faced this issue, and this system property helped to get empty string instead of null word. But this one is helping only on the 1st level of data and not helping with child data. There, it still shows null instead of "".
Original Message:
Sent: Thu December 14, 2023 10:12 PM
From: Sivakumar Chittu Damodharan
Subject: REST API Call giving NULL instead of blank when the values are empty
Thanks for your reply. We have tested this in the out-of-the-box Maximo 7.6.1.2 version, and we say "" instead of the word null. We had reached out to IBM, and they responded by saying we have to add a new system property (mxe.int.setnullattrasempty=1) to get an empty string ("") in the 7.6.1.3 version.
------------------------------
Sivakumar Chittu Damodharan
Original Message:
Sent: Wed December 13, 2023 08:09 AM
From: Steven Shull
Subject: REST API Call giving NULL instead of blank when the values are empty
What is the actual value in the database? When the value in the database is null, it should (even on 7.6.1.2) have been returning the data as null. And it would have only returned the attribute if you had the _dropnulls=0 query parameter since we don't return null values by default to minimize the JSON payload.
If the values in the database are an empty string, I could see there potentially being an issue where we're treating that the same as null. But assuming these values are null in the database, what you are getting in 7.6.1.3 is the expected response. Maybe someone implemented something (such as an OSOUT automation script) in your environment to try and override the values from null to a blank string?
------------------------------
Steven Shull
Original Message:
Sent: Tue December 12, 2023 12:54 PM
From: Sivakumar Chittu Damodharan
Subject: REST API Call giving NULL instead of blank when the values are empty
We are currently in the process of upgrading Maximo from 7.6.1.2 to 7.6.1.3, and we are seeing a weird issue when calling the REST API calls; in the current version, when a value is empty, it gives us a " string, but after upgrading to 7.6.1.3 we are NULL specified whenever the values are empty. Below are the two payloads from both the version for your reference. Has anyone crossed this issue, and how to overcome this?
Version 7.6.1.2
"woserviceaddress": [
{
"localref": http://localhost/maximo/api/os/ogsassetinspection/_RElTVFIvMjAyMy0xMDAwODczMDE2/serviceaddress/0-39919097,
"latitudey": 26.296669,
"city": "",
"description": "",
"staddrnumber": "",
"stateprovince": "",
"_rowstamp": "8242471845",
"saddresscode": "",
"postalcode": "",
"longitudex": -98.130486,
"streetaddress": "2824 E University Dr EDINBURG tx",
"href": http://childkey#V09SS09SREVSL1dPU0VSVklDRUFERFJFU1MvRElTVFIvMjAyMy0xMDAwODczMDE2,
"staddrstreet": "2824 E UNIVERSITY DR EDINBURG TX",
"serviceaddress_collectionref": http://localhost/maximo/api/os/ogsassetinspection/_RElTVFIvMjAyMy0xMDAwODczMDE2/serviceaddress/0-39919097/main_serviceaddress
}
],
…
Version 7.6.1.3
"woserviceaddress": [
{
"localref": http://localhost/maximo/api/os/ogsassetinspection/_RElTVFIvMjAyMy0xMDAwODczMDE2/serviceaddress/0-39919097,
"latitudey": 26.296669,
"city": null,
"description": null,
"staddrnumber": null,
"stateprovince": null,
"_rowstamp": "8242471845",
"saddresscode": null,
"postalcode": null,
"longitudex": -98.130486,
"streetaddress": "2824 E University Dr EDINBURG tx",
"href": http://childkey#V09SS09SREVSL1dPU0VSVklDRUFERFJFU1MvRElTVFIvMjAyMy0xMDAwODczMDE2,
"staddrstreet": "2824 E UNIVERSITY DR EDINBURG TX",
"serviceaddress_collectionref": http://localhost/maximo/api/os/ogsassetinspection/_RElTVFIvMjAyMy0xMDAwODczMDE2/serviceaddress/0-39919097/main_serviceaddress
}
],
------------------------------
Sivakumar Chittu Damodharan
------------------------------