OASIS Open Data Protocol (OData) TC

 View Only
  • 1.  "null" values in JSON

    Posted 05-21-2015 05:06
    Hi, Recently I was using Apache Olingo to expose OData V4 services. The JSON responses had a lot of "null" valued property entries which made responses too bloated. When I asked the question in Olingo forum, they said that the SPEC is NOT CLEAR about excluding them so they ought to be included. To me thats a problem. IMHO, unless client asks for it, null valued property entries should not be present and will only make JSON too verbose and heavy for consumption in certain cases. I understand $select can be employed but imagine a initial dataset for consumption where a lot of fields are still empty and clients makes a GET on EntitySet. Or should we have a means in the spec for client to state in Accept header that he doesn't need "null" values? Any comments? Thanks & Regards Anil