Skip to content

Commit 5827eb3

Browse files
authored
Merge pull request #226 from ifraixedes/if/fix-doc-map-method
Fix Map method documentation
2 parents 807836a + 21a77fa commit 5827eb3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gjson.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,8 @@ func (t Result) ForEach(iterator func(key, value Result) bool) {
283283
}
284284
}
285285

286-
// Map returns back an map of values. The result should be a JSON array.
286+
// Map returns back a map of values. The result should be a JSON object.
287+
// If the result is not a JSON object, the return value will be an empty map.
287288
func (t Result) Map() map[string]Result {
288289
if t.Type != JSON {
289290
return map[string]Result{}

0 commit comments

Comments
 (0)