Add with_std_json build tag

This commit is contained in:
世界
2022-07-24 17:58:52 +08:00
parent fe8e984608
commit 67edc163cb
17 changed files with 55 additions and 25 deletions

20
common/json/std.go Normal file
View File

@@ -0,0 +1,20 @@
//go:build with_std_json
package json
import "encoding/json"
var (
Marshal = json.Marshal
Unmarshal = json.Unmarshal
NewEncoder = json.NewEncoder
NewDecoder = json.NewDecoder
)
type (
Encoder = json.Encoder
Decoder = json.Decoder
Token = json.Token
Delim = json.Delim
SyntaxError = json.SyntaxError
)