“JSON exclut null” Réponses codées

Jackson ignore la valeur si null

public class Object {
  
    @JsonInclude(NON_NULL)
    @JsonProperty("property")
    private String property;
  
}
DullDev

JSON exclut 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
    }
  }
}
Yellowed Yacare

Réponses similaires à “JSON exclut null”

Questions similaires à “JSON exclut null”

Plus de réponses similaires à “JSON exclut null” dans JavaScript

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code