Documentation ¶
Index ¶
- Constants
- func AddIgnoreTag(tagName string, checkFunc CheckIgnoreTagFunc)
- func AddMarchallerByExample(val any, marchaller JsonifyMarchaller)
- func AddMarchallerByExamplePartType(val any, marchaller JsonifyMarchaller)
- func AddMarchallerByInterface(t reflect.Type, marchaller JsonifyMarchaller)
- func AddMarchallerByName(typeName string, marchaller JsonifyMarchaller)
- func AddMaskTag(tagName string, maskFunc MaskTagFunc)
- func GetSpecMarchaller() map[string]JsonifyMarchaller
- func Jsonify(val any, indent string, nextRow string) []byte
- func JsonifyM(val any) json.RawMessage
- func JsonifyS(val any, indent string, nextRow string) string
- func JsonifySLn(val any) string
- func JsonifySM(val any) string
- type CheckIgnoreTagFunc
- type Jsonifable
- type JsonifyMarchaller
- type MaskTagFunc
Constants ¶
const IgnoreTag string = "jignore"
const MaskTag string = "masker"
const MaskTagFirstLast string = "fl"
Variables ¶
This section is empty.
Functions ¶
func AddIgnoreTag ¶
func AddIgnoreTag(tagName string, checkFunc CheckIgnoreTagFunc)
func AddMarchallerByExample ¶
func AddMarchallerByExample(val any, marchaller JsonifyMarchaller)
func AddMarchallerByExamplePartType ¶
func AddMarchallerByExamplePartType(val any, marchaller JsonifyMarchaller)
func AddMarchallerByInterface ¶
func AddMarchallerByInterface(t reflect.Type, marchaller JsonifyMarchaller)
func AddMarchallerByName ¶
func AddMarchallerByName(typeName string, marchaller JsonifyMarchaller)
func AddMaskTag ¶
func AddMaskTag(tagName string, maskFunc MaskTagFunc)
func GetSpecMarchaller ¶
func GetSpecMarchaller() map[string]JsonifyMarchaller
func Jsonify ¶
Jsonify - makes json from val. Includes privat fields. use `jignore:""` tag for ignore field use `masker:""` tag for masking field with * (len will be same) use `masker:"fl"` tag for masking field exepting first and last value there is no cyclomatic protection
func JsonifyM ¶
func JsonifyM(val any) json.RawMessage
JsonifyM - makes json from val. Includes privat fields. use `jignore:""` tag for ignore field use `masker:""` tag for masking field with * (len will be same) use `masker:"fl"` tag for masking field exepting first and last value there is no cyclomatic protection
func JsonifyS ¶
JsonifyS - makes json from val. Includes privat fields. use `jignore:""` tag for ignore field use `masker:""` tag for masking field with * (len will be same) use `masker:"fl"` tag for masking field exepting first and last value there is no cyclomatic protection
func JsonifySLn ¶
JsonifySLn - makes json from val. Includes privat fields. use `jignore:""` tag for ignore field use `masker:""` tag for masking field with * (len will be same) use `masker:"fl"` tag for masking field exepting first and last value there is no cyclomatic protection
func JsonifySM ¶ added in v1.0.0
JsonifySM - (single line) makes json from val. Includes privat fields. use `jignore:""` tag for ignore field use `masker:""` tag for masking field with * (len will be same) use `masker:"fl"` tag for masking field exepting first and last value there is no cyclomatic protection
Types ¶
type CheckIgnoreTagFunc ¶
type Jsonifable ¶
type Jsonifable interface {
Jsonify() []byte
}