json

package
v0.1.32 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

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

func ParseJSON

func ParseJSON(body []byte) gjson.Result

func Unmarshal

func Unmarshal(src []byte, v interface{}) error

Unmarshal 对于爬虫,反序列化是浪费资源的事, 应尽量使用 gjson 完成对 json 的解析,实在无法 用 gjson 解析时,再用此方法进行反序列化。

这里使用性能更高的第三方库完成反序列化。

func UnmarshalFromString

func UnmarshalFromString(src string, v interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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