import dshould : be;
`{"a": 5, "b": 6}`.parseJSON.should.be.json(`{"a": 5, "b": 6}`.parseJSON);
`{"a": 5, "b": 6}`.parseJSON.should.be.json(`{"b": 6, "a": 5}`.parseJSON);
`{"a": 5, "b": 6}`.parseJSON.should.be.json(`{"a": 5}`.parseJSON).should.throwAn!Error;`{"a": 5, "b": 6}`.parseJSON.should.contain.json(`{}`.parseJSON);
`{"a": 5, "b": 6}`.parseJSON.should.contain.json(`{"b": 6}`.parseJSON);
`{"a": 5, "b": 6}`.parseJSON.should.contain.json(`{"c": 4}`.parseJSON).should.throwAn!Error;
`{"x": {"a": 5, "b": 6}}`.parseJSON.should.contain.json(`{"x": {"b": 6}}`.parseJSON);
`{"x": {"a": 5, "b": 6}}`.parseJSON.should.contain.json(`{"x": {"c": 4}}`.parseJSON).should.throwAn!Error;
`{"a": 5, "b": 6}`.parseJSON.should.contain.json(`{"b": 5}`.parseJSON).should.throwAn!Error;
`[2, 3]`.parseJSON.should.contain.json(`[2, 3]`.parseJSON);
`[2, 3]`.parseJSON.should.contain.json(`[2]`.parseJSON).should.throwAn!Error;import dshould : be;
`{"a": 5, "b": 6}`.parseJSON.should.be.json!`{"a": 5, "b": 6}`;
`{"a": 5, "b": 6}`.parseJSON.should.be.json!`{"b": 6, "a": 5}`;
`{"a": 5, "b": 6}`.parseJSON.should.be.json!`{"a": 5}`.should.throwAn!Error;`{"a": 5, "b": 6}`.parseJSON.should.contain.json!`{"a": 5}`;
Checks if a JSON value contains another JSON value. Keys that are only in the first JSON value are ignored.
In other words, every value in the second JSON value must appear in the same position in the first value.
This satisfies the JSON convention that extraneous keys are ignored.