-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: No Action
-
Affects Version/s: V4.0_WD01
-
Fix Version/s: None
-
Component/s: JSON Format
-
Labels:None
-
Proposal:
-
Resolution:
Annotation values may vary per entity, so they can be included in the JSON representation if they deviate from the default specified in $metadata.
A common case is that the lifecycle of an entity is decribed by a finite and typically small set of states, and that some or all instance annotations depend on the state only.
So it would really compress JSON responses if the response could define several named groups of annotation values and refer to them in other entities.
Example: as long as an order item hasn't been shipped, its quantity and delivery address can be updated. Once it has been shipped these properties become read-only. The first order item in state "shipped" defines an annotation group named "Shipped" that annotates the quantity- and address-related properties as read-only. Subsequent "shipped" items only refer to that group without having to repeat all annotations in that group.