From f023195a1ee979eb57c9d7bf0e3ee1317e9d40d1 Mon Sep 17 00:00:00 2001 From: Antonio Murdaca Date: Wed, 22 Apr 2015 00:47:51 +0200 Subject: [PATCH] Replace json.Unmarshal with json.Decoder().Decode() Signed-off-by: Antonio Murdaca --- parsers/filters/parse.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/parsers/filters/parse.go b/parsers/filters/parse.go index 9c056bb..df5486d 100644 --- a/parsers/filters/parse.go +++ b/parsers/filters/parse.go @@ -58,8 +58,7 @@ func FromParam(p string) (Args, error) { if len(p) == 0 { return args, nil } - err := json.Unmarshal([]byte(p), &args) - if err != nil { + if err := json.NewDecoder(strings.NewReader(p)).Decode(&args); err != nil { return nil, err } return args, nil