Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Unmarshal ¶
Unmarshal 对于爬虫,反序列化是浪费资源的事, 应尽量使用 gjson 完成对 json 的解析,实在无法 用 gjson 解析时,再用此方法进行反序列化。
这里使用性能更高的第三方库完成反序列化。
func UnmarshalFromString ¶
Types ¶
type JSONResult ¶ added in v0.1.9
func ParseBytesToJSON ¶ added in v0.1.9
func ParseBytesToJSON(body []byte) JSONResult
ParseBytesToJSON converts `[]byte` variable to JSONResult
func ParseJSON ¶
func ParseJSON(body string) JSONResult
ParseBytesToJSON converts `string` variable to JSONResult
Click to show internal directories.
Click to hide internal directories.