gf/encoding/gjson/gjson_api_config.go

22 lines
609 B
Go
Raw Normal View History

2019-05-08 22:04:36 +08:00
// Copyright 2017 gf Author(https://github.com/gogf/gf). All Rights Reserved.
//
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://github.com/gogf/gf.
package gjson
// SetSplitChar sets the separator char for hierarchical data access.
func (j *Json) SetSplitChar(char byte) {
2019-06-19 09:06:52 +08:00
j.mu.Lock()
j.c = char
j.mu.Unlock()
2019-05-08 22:04:36 +08:00
}
// SetViolenceCheck enables/disables violence check for hierarchical data access.
func (j *Json) SetViolenceCheck(enabled bool) {
2019-06-19 09:06:52 +08:00
j.mu.Lock()
j.vc = enabled
j.mu.Unlock()
2019-05-08 22:04:36 +08:00
}