forked from mirror/gjson
Add `arrayOrMap` result description
Explain `Result.Value` will return array and map when possible.
This commit is contained in:
parent
01f00f1296
commit
93d61e6369
2
gjson.go
2
gjson.go
|
@ -583,6 +583,8 @@ func (t Result) Exists() bool {
|
||||||
// Number, for JSON numbers
|
// Number, for JSON numbers
|
||||||
// string, for JSON string literals
|
// string, for JSON string literals
|
||||||
// nil, for JSON null
|
// nil, for JSON null
|
||||||
|
// map[string]interface{}, for JSON objects
|
||||||
|
// []interface{}, for JSON arrays
|
||||||
//
|
//
|
||||||
func (t Result) Value() interface{} {
|
func (t Result) Value() interface{} {
|
||||||
if t.Type == String {
|
if t.Type == String {
|
||||||
|
|
Loading…
Reference in New Issue