[ https://issues.apache.org/jira/browse/PROTON-1940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16628870#comment-16628870 ]
ASF GitHub Bot commented on PROTON-1940: ---------------------------------------- Github user astitcher commented on a diff in the pull request: https://github.com/apache/qpid-proton/pull/159#discussion_r220587087 --- Diff: c/src/core/codec.c --- @@ -657,7 +657,46 @@ int pn_data_vfill(pn_data_t *data, const char *fmt, va_list ap) } } break; - default: + case 'M': { /* multiple=true field value */ + /* Encode a pn_data_t * as a normalized multiple="true" field. + See file:///home/aconway/specs/amqp-core-complete-v1.0.pdf --- End diff -- What is 'multiple="true" field'? There is nothing called this in the standard is there? The ="true' naming seems to indicate boolean fields, but this is not the case afaict - and this really applies to a list of things that can also be empty in which case we just use null instead of the empty list. Also url to local file system is not very helpful! > [c] normalize encoding of multiple="true" fields > ------------------------------------------------ > > Key: PROTON-1940 > URL: https://issues.apache.org/jira/browse/PROTON-1940 > Project: Qpid Proton > Issue Type: Improvement > Components: proton-c > Affects Versions: proton-c-0.25.0 > Reporter: Alan Conway > Assignee: Alan Conway > Priority: Major > Fix For: proton-c-0.26.0 > > > The AMQP spec defines some frame fields as "multiple". > [http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-types-v1.0-os.html#section-composite-type-representation] > "The _multiple_ attribute of a field description controls whether multiple > element values are permitted in the representation. A single element of the > type specified in the field description is always permitted. Multiple values > are represented by the use of an array where the type of the elements in the > array is the type defined in the field definition. Note that a null value and > a zero-length array (with a correct type for its elements) both describe an > absence of a value and MUST be treated as semantically identical. " > Proton accepts all legal values. This issue is to normalize values written by > proton: > * empty array becomes null > * array of one element becomes a single value > This is the most efficient encoding, and some clients (.NET) have problems > with multiple fields that contain an empty array rather than a null. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org