From 9b12e4fe6f3c95986f1f3ec791636c58ca7e7583 Mon Sep 17 00:00:00 2001 From: Jake Champlin Date: Fri, 9 Jun 2017 17:54:32 +0000 Subject: Transfer of provider code --- .../terraform/helper/structure/normalize_json.go | 24 ---------------------- 1 file changed, 24 deletions(-) delete mode 100644 vendor/github.com/hashicorp/terraform/helper/structure/normalize_json.go (limited to 'vendor/github.com/hashicorp/terraform/helper/structure/normalize_json.go') diff --git a/vendor/github.com/hashicorp/terraform/helper/structure/normalize_json.go b/vendor/github.com/hashicorp/terraform/helper/structure/normalize_json.go deleted file mode 100644 index 3256b47..0000000 --- a/vendor/github.com/hashicorp/terraform/helper/structure/normalize_json.go +++ /dev/null @@ -1,24 +0,0 @@ -package structure - -import "encoding/json" - -// Takes a value containing JSON string and passes it through -// the JSON parser to normalize it, returns either a parsing -// error or normalized JSON string. -func NormalizeJsonString(jsonString interface{}) (string, error) { - var j interface{} - - if jsonString == nil || jsonString.(string) == "" { - return "", nil - } - - s := jsonString.(string) - - err := json.Unmarshal([]byte(s), &j) - if err != nil { - return s, err - } - - bytes, _ := json.Marshal(j) - return string(bytes[:]), nil -} -- cgit v1.2.3