Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-1361

Provide option to omit null properties from a JSON Response

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Resolved
    • Minor
    • Resolution: Abandoned
    • None
    • None
    • odata2-core
    • None

    Description

      There does not seem to be an option currently to ignore the null property values in the odata json response. 

      For example, we would like to have:

      { "name": "abc", "description": null}

      returned as:

      { "name": "abc"}

       

      ASP.Net currently has this feature: https://stackoverflow.com/questions/14486667/suppress-properties-with-null-value-on-asp-net-web-api

      I believe this would require enhancements to https://github.com/apache/olingo-odata2/blob/ae1653b2fbd1ac579ea7dfaec46af6dd150aa743/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/producer/JsonEntryEntityProducer.java

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            mseccafien Michael Seccafien
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: