You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CRUDOperations field missing in CallSite JSON when value is null for non-crud callsites #108
When serializing CallSite objects to JSON, the CRUDOperations field is missing if its value is null. This leads to inconsistencies in the JSON structure, causing downstream processes that rely on the presence of the CRUDOperations key to fail or behave unexpectedly.
Steps To Reproduce
Create a CallSite object with the CRUDOperations field set to null.
Serialize the CallSite object using Gson.
Inspect the resulting JSON output.
Observe that the CRUDOperations key is missing from the JSON.
Observed behavior
The CRUDOperations key does not appear in the JSON when its value is null, which disrupts systems expecting a consistent schema with this key present.
Expected behavior
The CRUDOperations key should appear in the JSON output, even when its value is null, to maintain a consistent schema for all CallSite objects.
Error Log
Not applicable, as the issue is related to the absence of expected fields in the JSON structure rather than an explicit error.
Environment (please complete the following information):
OS: Fedora 41
Version of Java: 21
Version of Gson: 2.10.1
Version of Maven/Gradle: N/A
Additional context
This issue can be resolved by configuring Gson to include null values during serialization using new GsonBuilder().serializeNulls().create().
Activity
Fix issue #108. Update gson to store nulls.
rahlk commentedon Feb 8, 2025
Fixed in commit 61346da