]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blobdiff - vendor/github.com/hashicorp/terraform/helper/structure/normalize_json.go
Transfer of provider code
[github/fretlink/terraform-provider-statuscake.git] / 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 (file)
index 3256b47..0000000
+++ /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
-}