blob: 95a6633b8831922d370415023fea3252bc2d49cf (
plain)
1
2
3
4
5
6
7
8
9
|
package parse
import "regexp"
var jsonFormatRegex = regexp.MustCompile(`^(\s*json\s*|\s*{{\s*json\s*\.\s*}}\s*)$`)
func MatchesJSONFormat(s string) bool {
return jsonFormatRegex.Match([]byte(s))
}
|