Skip to content

Commit

Permalink
Merge pull request buger#110 from jrbasso/patch-2
Browse files Browse the repository at this point in the history
Fixed GetInt docs
  • Loading branch information
buger authored Jul 27, 2017
2 parents 9addec9 + c6caba8 commit 8e4b7e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jsonparser.Get(data, "company")

// If the key doesn't exist it will throw an error
var size int64
if value, _, err := jsonparser.GetInt(data, "company", "size"); err == nil {
if value, err := jsonparser.GetInt(data, "company", "size"); err == nil {
size = value
}

Expand Down Expand Up @@ -145,7 +145,7 @@ func GetBoolean(data []byte, keys ...string) (val bool, err error)

func GetFloat(data []byte, keys ...string) (val float64, err error)

func GetInt(data []byte, keys ...string) (val float64, err error)
func GetInt(data []byte, keys ...string) (val int64, err error)
```
If you know the key type, you can use the helpers above.
If key data type do not match, it will return error.
Expand Down

0 comments on commit 8e4b7e0

Please sign in to comment.