summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-01-08 14:05:56 -0500
committerMatthew Heon <matthew.heon@pm.me>2019-01-10 15:48:09 -0500
commit167d50a9fa7bd9e7b3bcd344c8ea519ae98565bf (patch)
treed00183a20ae35731d8b967a157c0cd4be4698adc
parent1b761dbb02afc52f97a50af4b073a756c5cc6820 (diff)
downloadpodman-167d50a9fa7bd9e7b3bcd344c8ea519ae98565bf.tar.gz
podman-167d50a9fa7bd9e7b3bcd344c8ea519ae98565bf.tar.bz2
podman-167d50a9fa7bd9e7b3bcd344c8ea519ae98565bf.zip
Move all libpod/ JSON references over to jsoniter
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
-rw-r--r--libpod/boltdb_state.go4
-rw-r--r--libpod/boltdb_state_internal.go1
-rw-r--r--libpod/container.go1
-rw-r--r--libpod/container_internal.go1
-rw-r--r--libpod/container_internal_linux.go1
-rw-r--r--libpod/oci.go1
-rw-r--r--libpod/storage.go1
7 files changed, 3 insertions, 7 deletions
diff --git a/libpod/boltdb_state.go b/libpod/boltdb_state.go
index b154d8bda..e7a07a9a8 100644
--- a/libpod/boltdb_state.go
+++ b/libpod/boltdb_state.go
@@ -2,15 +2,17 @@ package libpod
import (
"bytes"
- "encoding/json"
"strings"
"sync"
"github.com/boltdb/bolt"
+ jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
+var json = jsoniter.ConfigCompatibleWithStandardLibrary
+
// BoltState is a state implementation backed by a Bolt DB
type BoltState struct {
valid bool
diff --git a/libpod/boltdb_state_internal.go b/libpod/boltdb_state_internal.go
index 29a7184c9..ea150cfac 100644
--- a/libpod/boltdb_state_internal.go
+++ b/libpod/boltdb_state_internal.go
@@ -2,7 +2,6 @@ package libpod
import (
"bytes"
- "encoding/json"
"runtime"
"strings"
diff --git a/libpod/container.go b/libpod/container.go
index 026eb1c4f..ca83bbffe 100644
--- a/libpod/container.go
+++ b/libpod/container.go
@@ -1,7 +1,6 @@
package libpod
import (
- "encoding/json"
"fmt"
"io/ioutil"
"net"
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 69df33bc9..90f4659da 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -3,7 +3,6 @@ package libpod
import (
"bytes"
"context"
- "encoding/json"
"fmt"
"io"
"io/ioutil"
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index 2f03d45ea..9b03db662 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -4,7 +4,6 @@ package libpod
import (
"context"
- "encoding/json"
"fmt"
"io/ioutil"
"net"
diff --git a/libpod/oci.go b/libpod/oci.go
index 31c1a7e85..7a908db2e 100644
--- a/libpod/oci.go
+++ b/libpod/oci.go
@@ -3,7 +3,6 @@ package libpod
import (
"bufio"
"bytes"
- "encoding/json"
"fmt"
"io/ioutil"
"net"
diff --git a/libpod/storage.go b/libpod/storage.go
index 10026efda..17d231171 100644
--- a/libpod/storage.go
+++ b/libpod/storage.go
@@ -2,7 +2,6 @@ package libpod
import (
"context"
- "encoding/json"
"time"
istorage "github.com/containers/image/storage"