github.com/cloudwego/hertz@v0.9.3/pkg/common/json/std.go (about) 1 // Copyright 2022 CloudWeGo Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 // 15 16 //go:build stdjson || !(amd64 && (linux || windows || darwin)) 17 // +build stdjson !amd64 !linux,!windows,!darwin 18 19 package json 20 21 import "encoding/json" 22 23 // Name is the name of the effective json package. 24 const Name = "encoding/json" 25 26 var ( 27 // Marshal is standard implementation exported by hertz which is used by rendering. 28 Marshal = json.Marshal 29 // Unmarshal is standard implementation exported by hertz which is used by binding. 30 Unmarshal = json.Unmarshal 31 // MarshalIndent is standard implementation exported by hertz. 32 MarshalIndent = json.MarshalIndent 33 // NewDecoder is standard implementation exported by hertz. 34 NewDecoder = json.NewDecoder 35 // NewEncoder is standard implementation exported by hertz. 36 NewEncoder = json.NewEncoder 37 )