terraform/vendor/github.com/maximilien/softlayer-go/common/utility.go

17 lines
221 B
Go
Raw Normal View History

package common
import (
"encoding/json"
)
func ValidateJson(s string) (bool, error) {
var js map[string]interface{}
err := json.Unmarshal([]byte(s), &js)
if err != nil {
return false, err
}
return true, nil
}