Make apiserver work with new encode/decode

This commit is contained in:
Daniel Smith
2014-06-20 16:18:36 -07:00
parent d7b4915111
commit 14361e336a
2 changed files with 15 additions and 7 deletions

View File

@@ -17,7 +17,6 @@ limitations under the License.
package apiserver
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
@@ -27,6 +26,7 @@ import (
"strings"
"time"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
)
@@ -130,7 +130,7 @@ func (server *ApiServer) notFound(req *http.Request, w http.ResponseWriter) {
func (server *ApiServer) write(statusCode int, object interface{}, w http.ResponseWriter) {
w.WriteHeader(statusCode)
output, err := json.MarshalIndent(object, "", " ")
output, err := api.EncodeIndent(object)
if err != nil {
server.error(err, w)
return