Answers for "json exclude null"

2

jackson ignore value if null

public class Object {
  
    @JsonInclude(NON_NULL)
    @JsonProperty("property")
    private String property;
  
}
Posted by: Guest on June-25-2020
0

json exclude null

{
  "token": {
    "schemaVersion": "1.0",
    "serviceInfo": {
      "requestAttributes": {
        "accountId": "6086618",
        "subscriptionId": "252613614945",
        "locationInformation": {
          "LACId": "",
          "MAC": "",
          "cellId": "",
          "countryName": "Somalia",
          "MCC": "637",
          "longitude": "",
          "latitude": "",
          "MNC": "50",
          "ip": "",
          "locationType": "4",
          "ipaddress": "",
          "locationInfoType": "4"
        },
        "deviceIdType": " ",
        "channelName": "MobileApp",
        "serviceType": "MMT",
        "sessionId": "MOBILEAPP;8635252557;zgO9F",
        "serviceHeader": {
          "Charging-Required": "0",
          "Service-Id": "4",
          "Authorization-Required": "1",
          "Account-Id": "6086618",
          "Product-Id": 13,
          "Service-Name": "BalanceQuery",
          "Valid-For-Unverified-Subs": "1",
          "isMultiCurrencyAllowed": "0",
          "Service-Code": "0004",
          "Is-Multi-Currency-Enabled": "0"
        },
        "recieverlocationInformation": {
          "LACId": "",
          "MAC": "",
          "cellId": "",
          "countryName": "Somalia",
          "MCC": "637",
          "longitude": "",
          "latitude": "",
          "MNC": "50",
          "ip": "",
          "locationType": "4",
          "ipaddress": "",
          "locationInfoType": "4"
        },
        "userType": "CUSTOMER"
      },
      "serviceName": "BalanceQuery",
      "serviceCode": "0004"
    },
    "requestId": "25B0A05E-0E6A-4807-AD2A-F8F2A92928EA",
    "systemInfo": {
      "systemId": null,
      "systemSecret": null
    }
  }
}
Posted by: Guest on June-07-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language