Passed
Push — main ( f0dc1d...8ca1be )
by Yume
01:47 queued 29s
created

json.*GoJSON.Unmarshal   A

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/goccy/go-json"
5
)
6
7
// GoJSON is a wrapper for goccy/go-json.
8
type GoJSON struct{}
9
10
// Marshal marshals the given value to JSON.
11
func (*GoJSON) Marshal(v interface{}) ([]byte, error) {
12
	return json.Marshal(v)
13
}
14
15
// Unmarshal unmarshals the given JSON to the given value.
16
func (*GoJSON) Unmarshal(data []byte, v interface{}) error {
17
	return json.Unmarshal(data, v)
18
}
19