Merge pull request #3494 from Thiht/patch-1

docs: Fix FromJson comment
This commit is contained in:
Matthew Fisher 2018-02-27 15:14:02 +00:00 committed by GitHub
commit be1e974ccc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -220,10 +220,10 @@ func ToJson(v interface{}) string {
return string(data)
}
// FromJson converts a YAML document into a map[string]interface{}.
// FromJson converts a JSON document into a map[string]interface{}.
//
// This is not a general-purpose JSON parser, and will not parse all valid
// YAML documents. Additionally, because its intended use is within templates
// JSON documents. Additionally, because its intended use is within templates
// it tolerates errors. It will insert the returned error message string into
// m["Error"] in the returned map.
func FromJson(str string) map[string]interface{} {