package
Version:
v1.0.22
Opens a new window with list of versions in this module.
Published: Nov 25, 2021
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Benchmark
Raw Result
goos: darwin
goarch: amd64
pkg: github.com/booldesign/utils/json
cpu: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
|
ns/op |
allocation bytes |
allocation times |
std decode |
1988 ns/op |
448 B/op |
11 allocs/op |
jsoniter decode |
745.2 ns/op |
288 B/op |
14 allocs/op |
std encode |
147.6 ns/op |
32 B/op |
2 allocs/op |
jsoniter encode |
123.9 ns/op |
26 B/op |
2 allocs/op |
Documentation
¶
func Decode(data []byte, v interface{}) error
Decode json解码
func Encode(v interface{}) []byte
Encode json编码
func EncodeToString(v interface{}) string
EncodeToString json编码返回string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.