commit a076a050b60c32493effef56bdb982b827ed318b
parent 7598de09e9da19684b5075c79ca50787c217288b
Author: MTRNord <mtrnord1@gmail.com>
Date: Sun, 3 Jun 2018 11:41:32 +0200
Use ffjson
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/wsListener/server.go b/wsListener/server.go
@@ -1,11 +1,11 @@
package wsListener
import (
- "encoding/json"
"fmt"
df "github.com/OpenHomeAuto/dialogflow-go-webhook"
"github.com/bjarneh/latinx"
"github.com/gorilla/mux"
+ "github.com/pquerna/ffjson/ffjson"
"io/ioutil"
"log"
"net/http"
@@ -60,7 +60,7 @@ func DFHandler(w http.ResponseWriter, r *http.Request) {
converter := latinx.Get(latinx.ISO_8859_1)
// encode a UTF-8 stream as ISO_8859_1
- dffb, err := json.Marshal(dff)
+ dffb, err := ffjson.Marshal(dff)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
log.Println("[WSERROR] failed to marshal json: " + err.Error())