Skip to content

Throw a warning for duplicate keys  #166

@mohsen1

Description

@mohsen1

In Swagger Editor people edit large YAML files and sometimes they mistakenly repeat a key in an object. JSYAML just overrides the first key with second one with no errors or warnings. It would be very helpful if JSYAML was throwing an error or a warning for duplicate keys so I could inform user about the issue.

To be clear, here is an example of duplicate keys:

one: 1
one: 2

this will be parsed to {one: 2}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions