summaryrefslogtreecommitdiff
path: root/cmd/podman/registry/json.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/registry/json.go')
-rw-r--r--cmd/podman/registry/json.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/cmd/podman/registry/json.go b/cmd/podman/registry/json.go
new file mode 100644
index 000000000..f25406c3c
--- /dev/null
+++ b/cmd/podman/registry/json.go
@@ -0,0 +1,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
+}