gjson_api_config.go 609 B

123456789101112131415161718192021
  1. // Copyright 2017 gf Author(https://github.com/gogf/gf). All Rights Reserved.
  2. //
  3. // This Source Code Form is subject to the terms of the MIT License.
  4. // If a copy of the MIT was not distributed with this file,
  5. // You can obtain one at https://github.com/gogf/gf.
  6. package gjson
  7. // SetSplitChar sets the separator char for hierarchical data access.
  8. func (j *Json) SetSplitChar(char byte) {
  9. j.mu.Lock()
  10. j.c = char
  11. j.mu.Unlock()
  12. }
  13. // SetViolenceCheck enables/disables violence check for hierarchical data access.
  14. func (j *Json) SetViolenceCheck(enabled bool) {
  15. j.mu.Lock()
  16. j.vc = enabled
  17. j.mu.Unlock()
  18. }