code: def validate_unique_items(value, **kwargs):
      
      # we can't just look at the items themselves since 0 and False are treated
      # the same as dictionary keys, and objects aren't hashable.
  
      counter = collections.Counter((
          json.dumps(v, sort_keys=True) for v in value
      ))
      dupes = [json.loads(v) for v, count in counter.items() if count > 1]
      if dupes:
          raise ValidationError(
              MESSAGES['unique_items']['invalid'].format(
                  repr(dupes),
              ),
          )
docs: Validator for ARRAY types to enforce that all array items must be unique.