/** * @deprecated use getOptions().contains(Option.TREATING_NULL_AS_ABSENT) */ @Deprecated public static boolean getTreatNullAsAbsent() { return configuration.getOptions().contains(TREATING_NULL_AS_ABSENT); }
@Override public String toString() { Set<Option> options = configuration.getOptions().values(); return "when comparing as JSON" + (!options.isEmpty() ? " with " + options : ""); } }
/** * @deprecated use getOptions().contains(Option.TREATING_NULL_AS_ABSENT) */ @Deprecated public static boolean getTreatNullAsAbsent() { return configuration.getOptions().contains(TREATING_NULL_AS_ABSENT); }
private boolean hasOption(Option option) { return configuration.getOptions().contains(option); }
private boolean isMatching() { return missingValues.isEmpty() && (extraValues.isEmpty() || !configuration.getOptions().contains(Option.IGNORING_EXTRA_ARRAY_ITEMS)); }
private boolean isMatching() { return missingValues.isEmpty() && (extraValues.isEmpty() || !configuration.getOptions().contains(Option.IGNORING_EXTRA_ARRAY_ITEMS)); }
private boolean hasOption(Option option) { return configuration.getOptions().contains(option); }
public static boolean nodeAbsent(Object json, Path path, Configuration configuration) { return nodeAbsent(json, path, configuration.getOptions().contains(Option.TREATING_NULL_AS_ABSENT)); }
public static boolean nodeAbsent(Object json, Path path, Configuration configuration) { return nodeAbsent(json, path, configuration.getOptions().contains(Option.TREATING_NULL_AS_ABSENT)); }
/** * When set to true, treats null nodes in actual value as absent. In other words * if you expect {"test":{"a":1}} this {"test":{"a":1, "b": null}} will pass the test. * * @deprecated use setOptions(Option.TREATING_NULL_AS_ABSENT) */ @Deprecated public static void setTreatNullAsAbsent(boolean treatNullAsAbsent) { if (treatNullAsAbsent) { configuration = configuration.withOptions(TREATING_NULL_AS_ABSENT); } else { configuration = configuration.withOptions(configuration.getOptions().without(TREATING_NULL_AS_ABSENT)); } }
/** * When set to true, treats null nodes in actual value as absent. In other words * if you expect {"test":{"a":1}} this {"test":{"a":1, "b": null}} will pass the test. * * @deprecated use setOptions(Option.TREATING_NULL_AS_ABSENT) */ @Deprecated public static void setTreatNullAsAbsent(boolean treatNullAsAbsent) { if (treatNullAsAbsent) { configuration = configuration.withOptions(TREATING_NULL_AS_ABSENT); } else { configuration = configuration.withOptions(configuration.getOptions().without(TREATING_NULL_AS_ABSENT)); } }