use lower level class to test instances in json type (#2817)