org.skyscreamer.jsonassert.comparator
Class DefaultComparator

java.lang.Object
  extended by org.skyscreamer.jsonassert.comparator.AbstractComparator
      extended by org.skyscreamer.jsonassert.comparator.DefaultComparator
All Implemented Interfaces:
JSONComparator

public class DefaultComparator
extends AbstractComparator

This class is the default json comparator implementation.

Comparison is performed according to JSONCompareMode that is passed as constructor's argument.


Constructor Summary
DefaultComparator(JSONCompareMode mode)
           
 
Method Summary
 void compareJSON(String prefix, org.json.JSONObject expected, org.json.JSONObject actual, JSONCompareResult result)
           
 void compareJSONArray(String prefix, org.json.JSONArray expected, org.json.JSONArray actual, JSONCompareResult result)
           
 void compareValues(String prefix, Object expectedValue, Object actualValue, JSONCompareResult result)
           
 
Methods inherited from class org.skyscreamer.jsonassert.comparator.AbstractComparator
checkJsonObjectKeysActualInExpected, checkJsonObjectKeysExpectedInActual, compareJSON, compareJSON, compareJSONArrayOfJsonObjects, compareJSONArrayOfSimpleValues, compareJSONArrayWithStrictOrder, recursivelyCompareJSONArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultComparator

public DefaultComparator(JSONCompareMode mode)
Method Detail

compareJSON

public void compareJSON(String prefix,
                        org.json.JSONObject expected,
                        org.json.JSONObject actual,
                        JSONCompareResult result)
                 throws org.json.JSONException
Throws:
org.json.JSONException

compareValues

public void compareValues(String prefix,
                          Object expectedValue,
                          Object actualValue,
                          JSONCompareResult result)
                   throws org.json.JSONException
Throws:
org.json.JSONException

compareJSONArray

public void compareJSONArray(String prefix,
                             org.json.JSONArray expected,
                             org.json.JSONArray actual,
                             JSONCompareResult result)
                      throws org.json.JSONException
Throws:
org.json.JSONException


Copyright © 2013. All Rights Reserved.