Documentation ¶
Index ¶
- Constants
- type JSON
- func (j JSON) ConvertLargeStringToByteSlice(str string) []byte
- func (j JSON) ConvertSmallStringToByteSlice(str string) []byte
- func (j JSON) Parse(jsonBytes *[]byte, v any) error
- func (j JSON) StringToByteSlice(str string) []byte
- func (j JSON) Stringify(t interface{}, indentLevel int) (string, error)
Constants ¶
View Source
const LARGE_STRING_MIN_LENGTH = 5_000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSON ¶
type JSON struct{}
func (JSON) ConvertLargeStringToByteSlice ¶ added in v1.1.0
The minor overhead for stream-based conversion is warrented for greater efficiency.
func (JSON) ConvertSmallStringToByteSlice ¶ added in v1.1.0
This is acceptable for smaller strings.
func (JSON) Parse ¶
Convert a JSON string to native data object, e.g.:
myData := make(map[string](interface{})) err := JSON.Parse(&myJsonString, &myData)
func (JSON) StringToByteSlice ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.