json.*SonicJSON.Unmarshal   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 2
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
package json
2
3
import (
4
	"github.com/bytedance/sonic"
5
)
6
7
type SonicJSON struct{}
8
9
func (s *SonicJSON) Marshal(v interface{}) ([]byte, error) {
10
	return sonic.Marshal(v)
11
}
12
13
func (s *SonicJSON) Unmarshal(data []byte, v interface{}) error {
14
	return sonic.Unmarshal(data, v)
15
}
16