WebUI: move from rpc/v2/json to rpc/v2/json2 which has better error response structure.

This commit is contained in:
Krishna Srinivas
2016-02-11 23:41:43 +05:30
committed by Harshavardhana
parent f98675660b
commit 6ad39cb386
8 changed files with 322 additions and 263 deletions

View File

@@ -22,7 +22,7 @@ import (
router "github.com/gorilla/mux"
jsonrpc "github.com/gorilla/rpc/v2"
"github.com/gorilla/rpc/v2/json"
"github.com/gorilla/rpc/v2/json2"
"github.com/minio/minio-go"
"github.com/minio/minio/pkg/fs"
"github.com/minio/minio/pkg/probe"
@@ -65,7 +65,7 @@ func getWebAPIHandler(web *WebAPI) http.Handler {
}
s := jsonrpc.NewServer()
codec := json.NewCodec()
codec := json2.NewCodec()
s.RegisterCodec(codec, "application/json")
s.RegisterCodec(codec, "application/json; charset=UTF-8")
s.RegisterService(web, "Web")