github.com/zhongdalu/gf@v1.0.0/g/encoding/gjson/gjson_api_config.go (about)

     1  // Copyright 2017 gf Author(https://github.com/zhongdalu/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/zhongdalu/gf.
     6  
     7  package gjson
     8  
     9  // SetSplitChar sets the separator char for hierarchical data access.
    10  func (j *Json) SetSplitChar(char byte) {
    11  	j.mu.Lock()
    12  	j.c = char
    13  	j.mu.Unlock()
    14  }
    15  
    16  // SetViolenceCheck enables/disables violence check for hierarchical data access.
    17  func (j *Json) SetViolenceCheck(enabled bool) {
    18  	j.mu.Lock()
    19  	j.vc = enabled
    20  	j.mu.Unlock()
    21  }