summaryrefslogtreecommitdiff
path: root/cmd/podman/registry/json.go
blob: f25406c3cedab133bfaeaff64504cf21b5d2acb0 (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
}