code: def json_compare(self, db_data, user_data):
          
          if isinstance(db_data, (string_types)):
              db_data = json.loads(db_data)
          if isinstance(user_data, (string_types)):
              user_data = json.loads(user_data)
          return self.deep_diff(db_data, user_data)
docs: Validate data in user data.
  
          Args:
              db_data (str): The data store in Redis.
              user_data (str): The user provided data.
  
          Returns:
              bool: True if the data passed validation.