Skip to content

How to detect duplicate keys? #130

@ulgens

Description

@ulgens

Coming from https://gitlab.com/bmares/check-json5/-/issues/1, I was wondering if there is anything similar to object_pairs_hook from

import json5
json5.load(f, object_pairs_hook=...)

I checked the source code, the documentation and the issues but couldn't find anything related to duplicate key detection. It looks like decode automatically deduplicates the keys and doesn't raise/return any error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions