...
1
2
3 package zerolog
4
5
6
7
8 import (
9 "github.com/rs/zerolog/internal/json"
10 )
11
12 var (
13 _ encoder = (*json.Encoder)(nil)
14
15 enc = json.Encoder{}
16 )
17
18 func init() {
19
20 json.JSONMarshalFunc = func(v interface{}) ([]byte, error) {
21 return InterfaceMarshalFunc(v)
22 }
23 }
24
25 func appendJSON(dst []byte, j []byte) []byte {
26 return append(dst, j...)
27 }
28
29 func decodeIfBinaryToString(in []byte) string {
30 return string(in)
31 }
32
33 func decodeObjectToStr(in []byte) string {
34 return string(in)
35 }
36
37 func decodeIfBinaryToBytes(in []byte) []byte {
38 return in
39 }
40
View as plain text