json

package
v0.0.0-...-cb9cbce Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareDifferenceStructByJson

func CompareDifferenceStructByJson(oldStruct interface{}, newStruct interface{}, update interface{})

兩結構體比對不同的字段, 不同時將取struct1中的字段返回, json為中間橋樑, struct3必須以指針方式傳遞, 否則可能獲取到空數據

func Json2Struct

func Json2Struct(str string, obj interface{})

json轉為結構體

func JsonI2Struct

func JsonI2Struct(str interface{}, obj interface{})

json interface轉為結構體

func Struct2Json

func Struct2Json(obj interface{}) string

結構體轉為json

func Struct2StructByJson

func Struct2StructByJson(struct1 interface{}, struct2 interface{})

結構體轉結構體, json為中間橋樑, struct2必須以指針方式傳遞, 否則可能獲取到空數據

Types

This section is empty.

Jump to

Keyboard shortcuts

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