Skip to content

Tests.json fails to parse #35

Open
@gregsdennis

Description

@gregsdennis

There is a test (below) that deals with duplicate keys. While not explicitly forbidden by JSON, many implementations may error when attempting to parse this:

{
    "comment": "duplicate ops",
    "doc": { "foo": "bar" },
    "patch": [ 
        {
            "op": "add",
            "path": "/baz",
            "value": "qux",
            "op": "move",
            "from":"/foo"
        }
    ],
    "error": "patch has two 'op' members",
    "disabled": true
}

The fact that it's marked as disabled doesn't help because, for these implementations, the JSON itself can't be read. Thus the failure occurs before the test, not as a result of it.

For additional context, this StackOverflow answer on duplicate keys is really nice.

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