You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-12-20 23:30:38 +02:00
#185 add jsoniter.Valid
This commit is contained in:
@@ -125,3 +125,8 @@ func (adapter *Encoder) SetEscapeHTML(escapeHTML bool) {
|
||||
config.EscapeHTML = escapeHTML
|
||||
adapter.stream.cfg = config.Froze().(*frozenConfig)
|
||||
}
|
||||
|
||||
// Valid reports whether data is a valid JSON encoding.
|
||||
func Valid(data []byte) bool {
|
||||
return ConfigDefault.Valid(data)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user