package utils import ( "encoding/json" ) func IsJSON(str string) bool { var js json.RawMessage return json.Unmarshal([]byte(str), &js) == nil }