Freigeben über


2.2.6.3.4 Complex Type

An instance of a ComplexType MUST be represented as a Verbose JSON object. Each declared property defined on the ComplexType MUST be represented as a name/value pair within the JSON object. Additional name/value pairs that do not represent a declared property of the ComplexType SHOULD NOT be included. The name in the name/value pair MUST equal the name of the declared property on the ComplexType and the value of the pair MUST equal the value of the property. The order name/value pairs that appear within the JSON object MUST be considered insignificant.

The syntax of the Verbose JSON representation of a ComplexType is defined by the grammar listed in this section. The grammar rule "entityCTInVJson" defines the Verbose JSON representation of a ComplexType that can be used in both request and response payloads.

 entityCTInVJson = begin-object
                   entityCTBody
                   end-object
  
 entityCTBody    = quotation-mark entityComplexProperty quotation-mark
                   name-seperator
                   entityCTValue
  
 entityCTMetadata = quotation-mark "__metadata" quotation-mark
                    name-seperator
                    begin-object
                    [typeNVP]
                    end-object
  
 entityCTValue   = begin-object
                   [
                     (
                       entityPropertyInVJson / 
                       entityCTBody / 
                       entityCTMetadata
                     )
                     *( 
                       (value-seperator entityPropertyInVJson) /
                       (value-seperator entityCTBody)
                     )
                  ]  
                  end-object 
  
 entityPropertyInVJson   = ; see section 2.2.6.3.8
  
 typeNVP                = ;see section 2.2.6.3.3   
  

Listing: ComplexType Verbose JSON Representation