json

package
v1.0.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2021 License: MIT Imports: 2 Imported by: 0

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode added in v1.0.19

func Decode(data []byte, v interface{}) error

Decode json解码

func Encode added in v1.0.19

func Encode(v interface{}) []byte

Encode json编码

func EncodeToString added in v1.0.19

func EncodeToString(v interface{}) string

EncodeToString json编码返回string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL