[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] (ODATA-818) Omit properties whose value is null or the $metadata-defined default value
[ https://issues.oasis-open.org/browse/ODATA-818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63375#comment-63375 ] Ralf Handl commented on ODATA-818: ---------------------------------- Part 1, section 8.1.5 states that OData services MUST include the OData-Version header on a response to specify the version of the protocol used to generate the response. https://tools.ietf.org/html/rfc7240#section-3 states that Use of the Preference-Applied header is only necessary when it is not readily and obviously apparent that a server applied a given preference and such ambiguity might have an impact on the client's handling of the response. For instance, when using either the "return=representation" or "return=minimal" preferences, a client application might not be capable of reliably determining if the preference was (or was not) applied simply by examining the payload of the response. In such a case, the Preference-Applied header field can be used. I see omit-values=nulls in the same category as a minimal representation that is not an empty response body: hard for clients to tell this apart from a "full" representation without the response header. So OData services MUST include this response header if they opt to omit nulls without being explicitly asked to do so. > Omit properties whose value is null or the $metadata-defined default value > -------------------------------------------------------------------------- > > Key: ODATA-818 > URL: https://issues.oasis-open.org/browse/ODATA-818 > Project: OASIS Open Data Protocol (OData) TC > Issue Type: Improvement > Components: OData JSON Format, OData Protocol > Affects Versions: V4.0_ERRATA02 > Environment: Simplified Payload [Proposed] > Reporter: Ralf Handl > Assignee: Ralf Handl > Labels: Performance > Fix For: V4.01_WD01 > > > Entities with many properties that are sparsely filled would benefit from optimizing the payload and omitting properties whose value is null. > With odata.metadata=minimal the client can deduce from the context URL whether a property is missing due to not being part of the projection or due to being null. > Maybe switch this on/off via a new preference in the Prefer header. -- This message was sent by Atlassian JIRA (v6.2.2#6258)
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]