Title: `CRUDOperations` field missing in `CallSite` JSON when value is `null` for non-crud callsites · Issue #108 · codellm-devkit/codeanalyzer-java · GitHub
Open Graph Title: `CRUDOperations` field missing in `CallSite` JSON when value is `null` for non-crud callsites · Issue #108 · codellm-devkit/codeanalyzer-java
X Title: `CRUDOperations` field missing in `CallSite` JSON when value is `null` for non-crud callsites · Issue #108 · codellm-devkit/codeanalyzer-java
Description: Describe the bug 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 CRUD...
Open Graph Description: Describe the bug 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 process...
X Description: Describe the bug 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 process...
Opengraph URL: https://github.com/codellm-devkit/codeanalyzer-java/issues/108
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`CRUDOperations` field missing in `CallSite` JSON when value is `null` for non-crud callsites","articleBody":"### **Describe the bug** \nWhen 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.\n\n---\n\n### **Steps To Reproduce** \n1. Create a `CallSite` object with the `CRUDOperations` field set to `null`. \n2. Serialize the `CallSite` object using Gson. \n3. Inspect the resulting JSON output. \n4. Observe that the `CRUDOperations` key is missing from the JSON. \n\n---\n\n### **Observed behavior** \nThe `CRUDOperations` key does not appear in the JSON when its value is `null`, which disrupts systems expecting a consistent schema with this key present.\n\n---\n\n### **Expected behavior** \nThe `CRUDOperations` key should appear in the JSON output, even when its value is `null`, to maintain a consistent schema for all `CallSite` objects.\n\n---\n\n### **Error Log** \nNot applicable, as the issue is related to the absence of expected fields in the JSON structure rather than an explicit error.\n\n---\n\n### **Environment (please complete the following information):** \n- OS: Fedora 41 \n- Version of Java: 21 \n- Version of Gson: 2.10.1 \n- Version of Maven/Gradle: N/A \n\n---\n\n### **Additional context** \nThis issue can be resolved by configuring Gson to include `null` values during serialization using `new GsonBuilder().serializeNulls().create()`.","author":{"url":"https://github.com/rahlk","@type":"Person","name":"rahlk"},"datePublished":"2025-02-08T03:14:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/108/codeanalyzer-java/issues/108"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:673b1689-5ebc-e424-8ae9-f4135d3f8a7c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D2B2:1941B5:1349CF4:18A151A:69902F01 |
| html-safe-nonce | d41269e5882123c40188292a92e8384b0f3955d10838b72e9e5f08fab8065cd2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMkIyOjE5NDFCNToxMzQ5Q0Y0OjE4QTE1MUE6Njk5MDJGMDEiLCJ2aXNpdG9yX2lkIjoiMTA5NTUyNzI5MDIyNTQxNTY5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e1407170970c87d89fbe61a5fa1f36c9f067d5f4ccded38c807e1b208c882795 |
| hovercard-subject-tag | issue:2839437987 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/codellm-devkit/codeanalyzer-java/108/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c271bf944c978486c15f35082cdd080138bd7c7d9cfd828746397b57646f1625/codellm-devkit/codeanalyzer-java/issues/108 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c271bf944c978486c15f35082cdd080138bd7c7d9cfd828746397b57646f1625/codellm-devkit/codeanalyzer-java/issues/108 |
| og:image:alt | Describe the bug 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 process... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rahlk |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/codellm-devkit/codeanalyzer-java git https://github.com/codellm-devkit/codeanalyzer-java.git |
| octolytics-dimension-user_id | 197800760 |
| octolytics-dimension-user_login | codellm-devkit |
| octolytics-dimension-repository_id | 731300153 |
| octolytics-dimension-repository_nwo | codellm-devkit/codeanalyzer-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 731300153 |
| octolytics-dimension-repository_network_root_nwo | codellm-devkit/codeanalyzer-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3b33c5aedc9808f45bc5fcf0b1e4404cf749dac7 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width