How about serializing, taking a hash, and comparing them?