// UnmarshalJSON makes unmarshaling compatible with lenses >= 4.3 and lenses <= 4.2
UnmarshalJSON makes unmarshaling compatible with lenses >= 4.3 and lenses <= 4.2
// UnmarshalJSON makes unmarshaling compatible with lenses > = 4 . 3 and lenses < = 4 . 2
func (topicName *TopicName) UnmarshalJSON(data []byte) error {
	var topicString string
	if err := json.Unmarshal(data, &topicString); err != nil {
		var legacyTopicName LegacyTopicName
		if err2 := json.Unmarshal(data, &legacyTopicName); err2 != nil {
			return err2
		}
		topicString = legacyTopicName.Name
	}
	topicName.Name = topicString
	return nil
}
func ( topicName * TopicName ) UnmarshalJSON ( data [ ] byte ) error { var topicString string if err := json . Unmarshal ( data , & topicString ) ; err != nil { var legacyTopicName LegacyTopicName if err2 := json . Unmarshal ( data , & legacyTopicName ) ; err2 != nil { return err2 } topicString = legacyTopicName . Name } topicName . Name = topicString return nil }
UnmarshalJSON makes unmarshaling compatible with lenses >= 4.3 and lenses <= 4.2
UnmarshalJSON makes unmarshaling compatible with lenses > = 4 . 3 and lenses < = 4 . 2