summaryrefslogtreecommitdiff
path: root/cmd/podman/registry/json.go
blob: a8a1623f54403f23c2173f487fe53f6792027f8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package registry

import (
	"sync"

	jsoniter "github.com/json-iterator/go"
)

var (
	json     jsoniter.API
	jsonSync sync.Once
)

// JSONLibrary provides a "encoding/json" compatible API
func JSONLibrary() jsoniter.API {
	jsonSync.Do(func() {
		json = jsoniter.ConfigCompatibleWithStandardLibrary
	})
	return json
}