def to_json(self, nested=False):
        data = {
            "id": self.pk,
            "object_type": "tag",
            "type": self.type,
            "value": self.value,
            "lang": self.lang,
            "type_name": self.type_name,
            "value_name": self.value_name,
        }

        if not nested:
            data["concepts"] = [concept.to_json(nested=True) for concept in self.concepts.all()]

        return data