Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order in array isn't ignored #1

Open
michaIT opened this issue Sep 13, 2019 · 1 comment
Open

Order in array isn't ignored #1

michaIT opened this issue Sep 13, 2019 · 1 comment

Comments

@michaIT
Copy link

michaIT commented Sep 13, 2019

My JSON has the following values:
channels

The result is false. When I set ignore: ['channels'] - result is true.

I'm a little bit confused because for the same case is a different result via RunKit - the result is true:
https://npm.runkit.com/json-schema-compare

`var compare = require('json-schema-compare')

var isEqual = compare({
title: 'title 1',
type: ['object'],
dependencies: {
name: ['age', 'lastName']
}
}, {
title: 'title 2',
type: 'object',
dependencies: {
name: ['lastName', 'age']
}
}, {
ignore: ['title']
})`

@mokkabonna
Copy link
Owner

I don't understand, channels is not a valid schema keyword. Are you using it to compare json values? It is meant to compare JSON schemas.

Or is it used as dependencies as in my example? More data is required, can you give me a full example of what you are trying to do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants