This method is difficult to understand. I *think* it exists because you want to recursively compare dictionaries that have certain values that are stringified representations of JSON objects, and since order doesn't matter with that, you need to parse the JSON objects before doing the comparison. If that is indeed the purpose of this method, then I'd say you're better off taking the object you want to assert on, recursively going through it and replacing JSON strings with parsed JSON objects, and then doing a standard recursive dictionary comparison on it -- it would be much easier to understand. If this method is designed to do something different, then it needs to make the intent clearer.