Skip to content

Commit c8c6fce

Browse files
committed
Add butNonStrict() method
1 parent 3d25774 commit c8c6fce

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/org/skyscreamer/jsonassert/JSONCompareMode.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,11 @@ public boolean isExtensible() {
7272
public boolean hasStrictOrder() {
7373
return _strictOrder;
7474
}
75+
76+
/**
77+
* @return the non-strict equivalent.
78+
*/
79+
public JSONCompareMode butNotStrict() {
80+
return isExtensible() ? LENIENT : NON_EXTENSIBLE;
81+
}
7582
}

0 commit comments

Comments
 (0)