Skip to content

spec: parsing should handle case of duplicated keys with differing values #50

Description

@odeke-em

Currently in the instrumentation, we ensure that we use maps and have unique keys ALWAYS. However, when parsing, the data might come from an arbitrary source or some languages might not have facilities for maps and say for attributes that might arrive on the wire and be appended or for lists, we should define what to do when we encounter duplicated keys with differing values.

For example

1. As list

/*foo='bar',foo='baz',foo='fizz'*/

which we should then interprete as a list

key: foo
values: ['bar', 'baz', 'fizz']

or perhaps we can be stricter and say the last value wins so

2. As set

/*foo='bar',foo='baz',foo='fizz'*/

which we should then interprete as a list

key: foo
value: 'fizz'

/cc @leepengxiang

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions