Example usage for javax.json JsonObject equals

List of usage examples for javax.json JsonObject equals

Introduction

In this page you can find the example usage for javax.json JsonObject equals.

Prototype

boolean equals(Object o);

Source Link

Document

Compares the specified object with this map for equality.

Usage

From source file:org.kitodo.production.forms.IndexingForm.java

private boolean isMappingEqualTo(String mapping) {
    try (JsonReader mappingExpectedReader = Json.createReader(new StringReader(mapping));
            JsonReader mappingCurrentReader = Json
                    .createReader(new StringReader(indexRestClient.getMapping()))) {
        JsonObject mappingExpected = mappingExpectedReader.readObject();
        JsonObject mappingCurrent = mappingCurrentReader.readObject().getJsonObject(indexRestClient.getIndex());
        return mappingExpected.equals(mappingCurrent);
    } catch (IOException e) {
        return false;
    }/*ww w.  j a  va 2  s .c o  m*/
}